summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/mismatched_target_os_unix.fixed
blob: 7d9d406d99dfcabf0828ed6eb5f1b3125f916f7e (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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// run-rustfix

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

#[cfg(target_os = "linux")]
fn linux() {}

#[cfg(target_os = "freebsd")]
fn freebsd() {}

#[cfg(target_os = "dragonfly")]
fn dragonfly() {}

#[cfg(target_os = "openbsd")]
fn openbsd() {}

#[cfg(target_os = "netbsd")]
fn netbsd() {}

#[cfg(target_os = "macos")]
fn macos() {}

#[cfg(target_os = "ios")]
fn ios() {}

#[cfg(target_os = "android")]
fn android() {}

#[cfg(target_os = "emscripten")]
fn emscripten() {}

#[cfg(target_os = "fuchsia")]
fn fuchsia() {}

#[cfg(target_os = "haiku")]
fn haiku() {}

#[cfg(target_os = "illumos")]
fn illumos() {}

#[cfg(target_os = "l4re")]
fn l4re() {}

#[cfg(target_os = "redox")]
fn redox() {}

#[cfg(target_os = "solaris")]
fn solaris() {}

#[cfg(target_os = "vxworks")]
fn vxworks() {}

// list with conditions
#[cfg(all(not(any(target_os = "solaris", target_os = "linux")), target_os = "freebsd"))]
fn list() {}

// correct use, should be ignored
#[cfg(target_os = "freebsd")]
fn correct() {}

fn main() {}