2022-02-19 17:04:10 -06:00
|
|
|
// This test checks that we lint on non well known names and that we don't lint on well known names
|
|
|
|
//
|
|
|
|
// check-pass
|
2023-05-01 07:16:38 -05:00
|
|
|
// compile-flags: --check-cfg=cfg() -Z unstable-options
|
2022-02-19 17:04:10 -06:00
|
|
|
|
|
|
|
#[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() {}
|
|
|
|
|
2022-03-09 09:52:38 -06:00
|
|
|
#[cfg(miri)]
|
|
|
|
fn miri() {}
|
|
|
|
|
|
|
|
#[cfg(doc)]
|
|
|
|
fn doc() {}
|
|
|
|
|
2022-02-19 17:04:10 -06:00
|
|
|
fn main() {}
|