Open
Description
Compiler is emitting an error even if the code is disabled.
I tried this code:
fn main() {}
#[cfg(FALSE)]
trait T {
default const X: u8;
}
I expected to see this happen: Compiles correctly.
Instead, this happened:
./test.rs:5:13: error: expecting ‘!’ but ‘const’ found
5 | default const X: u8;
| ^~~~~
./test.rs:5:13: error: failed to parse trait item in trait
./test.rs:5:13: error: failed to parse item in crate
https://godbolt.org/z/eP38brEKn
Meta
Metadata
Metadata
Assignees
Type
Projects
Status
Todo