]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_target_os_unix.rs
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / mismatched_target_os_unix.rs
1 // run-rustfix
2
3 #![warn(clippy::mismatched_target_os)]
4 #![allow(unused)]
5
6 #[cfg(linux)]
7 fn linux() {}
8
9 #[cfg(freebsd)]
10 fn freebsd() {}
11
12 #[cfg(dragonfly)]
13 fn dragonfly() {}
14
15 #[cfg(openbsd)]
16 fn openbsd() {}
17
18 #[cfg(netbsd)]
19 fn netbsd() {}
20
21 #[cfg(macos)]
22 fn macos() {}
23
24 #[cfg(ios)]
25 fn ios() {}
26
27 #[cfg(android)]
28 fn android() {}
29
30 #[cfg(emscripten)]
31 fn emscripten() {}
32
33 #[cfg(fuchsia)]
34 fn fuchsia() {}
35
36 #[cfg(haiku)]
37 fn haiku() {}
38
39 #[cfg(illumos)]
40 fn illumos() {}
41
42 #[cfg(l4re)]
43 fn l4re() {}
44
45 #[cfg(redox)]
46 fn redox() {}
47
48 #[cfg(solaris)]
49 fn solaris() {}
50
51 #[cfg(vxworks)]
52 fn vxworks() {}
53
54 // list with conditions
55 #[cfg(all(not(any(solaris, linux)), freebsd))]
56 fn list() {}
57
58 // correct use, should be ignored
59 #[cfg(target_os = "freebsd")]
60 fn correct() {}
61
62 fn main() {}