summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/mismatched_target_os_non_unix.rs
blob: e00224f5ceb40e54322201a1d8b85cf260433cc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
//@run-rustfix

#![warn(clippy::mismatched_target_os)]
#![allow(unused)]

#[cfg(hermit)]
fn hermit() {}

#[cfg(wasi)]
fn wasi() {}

#[cfg(none)]
fn none() {}

// list with conditions
#[cfg(all(not(windows), 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() {}