summaryrefslogtreecommitdiffstats
path: root/tests/ui/check-cfg/well-known-names.rs
blob: e57fb69a1e05f2d94a7982ee39af6fa2b4fb03fd (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
// This test checks that we lint on non well known names and that we don't lint on well known names
//
// check-pass
// compile-flags: --check-cfg=names() -Z unstable-options

#[cfg(target_oz = "linux")]
//~^ WARNING unexpected `cfg` condition name
fn target_os_misspell() {}

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

#[cfg(features = "foo")]
//~^ WARNING unexpected `cfg` condition name
fn feature_misspell() {}

#[cfg(feature = "foo")]
fn feature() {}

#[cfg(uniw)]
//~^ WARNING unexpected `cfg` condition name
fn unix_misspell() {}

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

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

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

fn main() {}