]> git.lizzy.rs Git - rust.git/blob - src/test/ui/check-cfg/no-values.rs
Rollup merge of #106043 - c410-f3r:moar-errors, r=petrochenkov
[rust.git] / src / test / ui / check-cfg / no-values.rs
1 // Check that we detect unexpected value when none are allowed
2 //
3 // check-pass
4 // compile-flags: --check-cfg=values(test) --check-cfg=values(feature) -Z unstable-options
5
6 #[cfg(feature = "foo")]
7 //~^ WARNING unexpected `cfg` condition value
8 fn do_foo() {}
9
10 #[cfg(test = "foo")]
11 //~^ WARNING unexpected `cfg` condition value
12 fn do_foo() {}
13
14 fn main() {}