-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
fn bug() {
let _ = || {
#[cfg(not(target_arch == "x86"))] {}
};
}
when compiled (this works on nightly and beta, so I presume it also happens on stable), this produces:
error: expected one of `(`, `)`, `,`, `::`, or `=`, found `==`
--> src\lib.rs:3:31
|
3 | #[cfg(not(target_arch == "x86"))] {}
| ^^ expected one of `(`, `)`, `,`, `::`, or `=`
error: could not compile `testlib`
Caused by:
process didn't exit successfully: `rustc --crate-name testlib --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 -C metadata=0ff8eeface1c2012 -C extra-filename=-0ff8eeface1c2012 --out-dir C:\Users\aaron\Documents\github\testlib\target\debug\deps -C incremental=C:\Users\aaron\Documents\github\testlib\target\debug\incremental -L dependency=C:\Users\aaron\Documents\github\testlib\target\debug\deps` (exit code: 0xc0000409, STATUS_STACK_BUFFER_OVERRUN)
Backtrace does not work.
Metadata
Metadata
Assignees
Labels
A-parserArea: The lexing & parsing of Rust source code to an ASTArea: The lexing & parsing of Rust source code to an ASTC-bugCategory: This is a bug.Category: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.P-mediumMedium priorityMedium priorityT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.