rust/tests/ui/parser/attribute/attr-unquoted-ident.fixed
2024-01-12 13:59:47 -08:00

16 lines
478 B
Rust

// compile-flags: -Zdeduplicate-diagnostics=yes
// run-rustfix
fn main() {
#[cfg(key="foo")]
//~^ ERROR expected unsuffixed literal, found `foo`
//~| HELP surround the identifier with quotation marks to parse it as a string
println!();
#[cfg(key="bar")]
println!();
#[cfg(key="foo bar baz")]
//~^ ERROR expected unsuffixed literal, found `foo`
//~| HELP surround the identifier with quotation marks to parse it as a string
println!();
}