1 // run-rustfix
2 
3 #![warn(clippy::mismatched_target_os)]
4 #![allow(unused)]
5 
6 #[cfg(hermit)]
hermit()7 fn hermit() {}
8 
9 #[cfg(wasi)]
wasi()10 fn wasi() {}
11 
12 #[cfg(none)]
none()13 fn none() {}
14 
15 // list with conditions
16 #[cfg(all(not(windows), wasi))]
list()17 fn list() {}
18 
19 // windows is a valid target family, should be ignored
20 #[cfg(windows)]
windows()21 fn windows() {}
22 
23 // correct use, should be ignored
24 #[cfg(target_os = "hermit")]
correct()25 fn correct() {}
26 
main()27 fn main() {}
28