]> git.lizzy.rs Git - rust.git/blob - tests/ui/check-cfg/well-known-values.rs
Rollup merge of #106397 - compiler-errors:new-solver-impl-wc, r=lcnr
[rust.git] / tests / ui / check-cfg / well-known-values.rs
1 // This test check that we lint on non well known values and that we don't lint on well known
2 // values
3 //
4 // check-pass
5 // compile-flags: --check-cfg=values() -Z unstable-options
6
7 #[cfg(target_os = "linuz")]
8 //~^ WARNING unexpected `cfg` condition value
9 fn target_os_linux_misspell() {}
10
11 #[cfg(target_os = "linux")]
12 fn target_os_linux() {}
13
14 #[cfg(target_has_atomic = "0")]
15 //~^ WARNING unexpected `cfg` condition value
16 fn target_has_atomic_invalid() {}
17
18 #[cfg(target_has_atomic = "8")]
19 fn target_has_atomic() {}
20
21 #[cfg(unix = "aa")]
22 //~^ WARNING unexpected `cfg` condition value
23 fn unix_with_value() {}
24
25 #[cfg(unix)]
26 fn unix() {}
27
28 #[cfg(miri = "miri")]
29 //~^ WARNING unexpected `cfg` condition value
30 fn miri_with_value() {}
31
32 #[cfg(miri)]
33 fn miri() {}
34
35 #[cfg(doc = "linux")]
36 //~^ WARNING unexpected `cfg` condition value
37 fn doc_with_value() {}
38
39 #[cfg(doc)]
40 fn doc() {}
41
42 fn main() {}