blob: 4f8481315df6b9e0da80f886dcbad385a3a5ec4f [file] [log] [blame]
// Check that we detect unexpected value when none are allowed
//
// check-pass
// revisions: simple mixed empty
// compile-flags: -Z unstable-options
// compile-flags: --check-cfg=cfg(values,simple,mixed,empty)
// [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature)
// [mixed]compile-flags: --check-cfg=cfg(test,feature)
// [empty]compile-flags: --check-cfg=cfg(test,feature,values(none()))
#[cfg(feature = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}
#[cfg(test = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}
fn main() {}