os-rust/tests/ui/check-cfg/empty-values.rs

14 lines
300 B
Rust

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