]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_target_os_non_unix.fixed
Rollup merge of #92849 - flip1995:clippyup, r=Manishearth
[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 = "hermit")]
7 fn hermit() {}
8
9 #[cfg(target_os = "wasi")]
10 fn wasi() {}
11
12 #[cfg(target_os = "none")]
13 fn none() {}
14
15 // list with conditions
16 #[cfg(all(not(windows), target_os = "wasi"))]
17 fn list() {}
18
19 // windows is a valid target family, should be ignored
20 #[cfg(windows)]
21 fn windows() {}
22
23 // correct use, should be ignored
24 #[cfg(target_os = "hermit")]
25 fn correct() {}
26
27 fn main() {}