summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-cfg/no-expected-values.rs
blob: 9f34c019ea534a7e345b7113c69b59633c7743d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// 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())

#[cfg(feature = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}

#[cfg(test = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}

fn main() {}