]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_target_os_non_unix.fixed
Auto merge of #68717 - petrochenkov:stabexpat, r=varkor
[rust.git] / tests / ui / mismatched_target_os_non_unix.fixed
1 // run-rustfix
2
3 #![warn(clippy::mismatched_target_os)]
4 #![allow(unused)]
5
6 #[cfg(target_os = "cloudabi")]
7 fn cloudabi() {}
8
9 #[cfg(target_os = "hermit")]
10 fn hermit() {}
11
12 #[cfg(target_os = "wasi")]
13 fn wasi() {}
14
15 #[cfg(target_os = "none")]
16 fn none() {}
17
18 // list with conditions
19 #[cfg(all(not(any(windows, target_os = "cloudabi")), target_os = "wasi"))]
20 fn list() {}
21
22 // windows is a valid target family, should be ignored
23 #[cfg(windows)]
24 fn windows() {}
25
26 // correct use, should be ignored
27 #[cfg(target_os = "hermit")]
28 fn correct() {}
29
30 fn main() {}