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