Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/70624.rs: fixed with errors #538

Merged
merged 1 commit into from
Nov 5, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 5, 2020

Issue: rust-lang/rust#70624

macro_rules! breakme {
    ($config:stmt; $($tokens:literal)*) => {
        #[cfg($config)]
        $($tokens)*
    };
}

fn main() {
    macro_rules! unix {
        () => {
            not(unix)
        };
    }

    breakme!(unix!(); "test");
}
=== stdout ===
=== stderr ===
error: expected unsuffixed literal or identifier, found `unix!()`
  --> /home/runner/work/glacier/glacier/ices/70624.rs:3:15
   |
3  |         #[cfg($config)]
   |               ^^^^^^^
...
15 |     breakme!(unix!(); "test");
   |     -------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused macro definition
  --> /home/runner/work/glacier/glacier/ices/70624.rs:9:5
   |
9  | /     macro_rules! unix {
10 | |         () => {
11 | |             not(unix)
12 | |         };
13 | |     }
   | |_____^
   |
   = note: `#[warn(unused_macros)]` on by default

error: aborting due to previous error; 1 warning emitted

==============

=== stdout ===
=== stderr ===
error: expected unsuffixed literal or identifier, found `unix!()`
  --> /home/runner/work/glacier/glacier/ices/70624.rs:3:15
   |
3  |         #[cfg($config)]
   |               ^^^^^^^
...
15 |     breakme!(unix!(); "test");
   |     -------------------------- in this macro invocation
   |
   = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: unused macro definition
  --> /home/runner/work/glacier/glacier/ices/70624.rs:9:5
   |
9  | /     macro_rules! unix {
10 | |         () => {
11 | |             not(unix)
12 | |         };
13 | |     }
   | |_____^
   |
   = note: `#[warn(unused_macros)]` on by default

error: aborting due to previous error; 1 warning emitted

==============
@Alexendoo Alexendoo merged commit f6ee4be into master Nov 5, 2020
@Alexendoo Alexendoo deleted the autofix/ices/70624.rs branch November 5, 2020 13:00
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants