]> git.lizzy.rs Git - rust.git/blob - tests/ui/check-cfg/no-values.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / 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() {}