mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
517374150c
this directive prevents compiletest from adding any implicit and automatic --check-cfg arguments
19 lines
471 B
Rust
19 lines
471 B
Rust
// #120427
|
|
// This test checks that when a single cfg has a value for user's specified name
|
|
// suggest to use `#[cfg(target_os = "linux")]` instead of `#[cfg(linux)]`
|
|
//
|
|
//@ check-pass
|
|
//@ no-auto-check-cfg
|
|
//@ compile-flags: --check-cfg=cfg()
|
|
|
|
#[cfg(linux)]
|
|
//~^ WARNING unexpected `cfg` condition name: `linux`
|
|
fn x() {}
|
|
|
|
// will not suggest if the cfg has a value
|
|
#[cfg(linux = "os-name")]
|
|
//~^ WARNING unexpected `cfg` condition name: `linux`
|
|
fn y() {}
|
|
|
|
fn main() {}
|