rust/tests/ui/cfg/cfg-path-error.rs
2024-02-16 20:02:50 +00:00

20 lines
401 B
Rust

//@ check-fail
#[cfg(any(foo, foo::bar))]
//~^ERROR `cfg` predicate key must be an identifier
fn foo1() {}
#[cfg(any(foo::bar, foo))]
//~^ERROR `cfg` predicate key must be an identifier
fn foo2() {}
#[cfg(all(foo, foo::bar))]
//~^ERROR `cfg` predicate key must be an identifier
fn foo3() {}
#[cfg(all(foo::bar, foo))]
//~^ERROR `cfg` predicate key must be an identifier
fn foo4() {}
fn main() {}