21 lines
673 B
Rust
21 lines
673 B
Rust
|
// Check that we detect unexpected value when none are allowed
|
||
|
//
|
||
|
// check-pass
|
||
|
// revisions: values simple mixed empty
|
||
|
// compile-flags: -Z unstable-options
|
||
|
// compile-flags: --check-cfg=cfg(values,simple,mixed,empty)
|
||
|
// [values]compile-flags: --check-cfg=values(test) --check-cfg=values(feature)
|
||
|
// [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())
|
||
|
|
||
|
#[cfg(feature = "foo")]
|
||
|
//~^ WARNING unexpected `cfg` condition value
|
||
|
fn do_foo() {}
|
||
|
|
||
|
#[cfg(test = "foo")]
|
||
|
//~^ WARNING unexpected `cfg` condition value
|
||
|
fn do_foo() {}
|
||
|
|
||
|
fn main() {}
|