summaryrefslogtreecommitdiffstats
path: root/src/test/ui/check-cfg/no-values.rs
blob: 8c80f56cb5a30e8a1f12e4dbc2106090c55e4795 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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() {}