]> git.lizzy.rs Git - rust.git/blob - tests/ui/check-cfg/well-known-names.rs
Rollup merge of #103236 - tspiteri:redoc-int-adc-sbb, r=m-ou-se
[rust.git] / tests / ui / check-cfg / well-known-names.rs
1 // This test checks that we lint on non well known names and that we don't lint on well known names
2 //
3 // check-pass
4 // compile-flags: --check-cfg=names() -Z unstable-options
5
6 #[cfg(target_oz = "linux")]
7 //~^ WARNING unexpected `cfg` condition name
8 fn target_os_misspell() {}
9
10 #[cfg(target_os = "linux")]
11 fn target_os() {}
12
13 #[cfg(features = "foo")]
14 //~^ WARNING unexpected `cfg` condition name
15 fn feature_misspell() {}
16
17 #[cfg(feature = "foo")]
18 fn feature() {}
19
20 #[cfg(uniw)]
21 //~^ WARNING unexpected `cfg` condition name
22 fn unix_misspell() {}
23
24 #[cfg(unix)]
25 fn unix() {}
26
27 #[cfg(miri)]
28 fn miri() {}
29
30 #[cfg(doc)]
31 fn doc() {}
32
33 fn main() {}