]> git.lizzy.rs Git - rust.git/blob - tests/ui/mismatched_target_os_non_unix.rs
Fix #88256, remove duplicated diagnostic
[rust.git] / tests / ui / mismatched_target_os_non_unix.rs
1 // run-rustfix
2
3 #![warn(clippy::mismatched_target_os)]
4 #![allow(unused)]
5
6 #[cfg(hermit)]
7 fn hermit() {}
8
9 #[cfg(wasi)]
10 fn wasi() {}
11
12 #[cfg(none)]
13 fn none() {}
14
15 // list with conditions
16 #[cfg(all(not(windows), 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() {}