rust/tests/ui/check-cfg/no-values.rs
2023-01-11 09:32:08 +00:00

15 lines
354 B
Rust

// Check that we detect unexpected value when none are allowed
//
// check-pass
// compile-flags: --check-cfg=values(test) --check-cfg=values(feature) -Z unstable-options
#[cfg(feature = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}
#[cfg(test = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}
fn main() {}