rust-clippy/tests/ui/mismatched_target_os_non_unix.fixed
2023-08-11 14:02:28 +00:00

25 lines
450 B
Rust

#![warn(clippy::mismatched_target_os)]
#![allow(unused)]
#[cfg(target_os = "hermit")]
fn hermit() {}
#[cfg(target_os = "wasi")]
fn wasi() {}
#[cfg(target_os = "none")]
fn none() {}
// list with conditions
#[cfg(all(not(windows), target_os = "wasi"))]
fn list() {}
// windows is a valid target family, should be ignored
#[cfg(windows)]
fn windows() {}
// correct use, should be ignored
#[cfg(target_os = "hermit")]
fn correct() {}
fn main() {}