2023-04-30 12:09:15 -05:00
|
|
|
//@ check-pass
|
2024-04-09 07:07:30 -05:00
|
|
|
//@ no-auto-check-cfg
|
2023-11-22 09:50:24 -06:00
|
|
|
//@ revisions: cargo rustc
|
2024-02-17 09:45:59 -06:00
|
|
|
//@ [rustc]unset-rustc-env:CARGO_CRATE_NAME
|
|
|
|
//@ [cargo]rustc-env:CARGO_CRATE_NAME=foo
|
2024-02-25 07:56:14 -06:00
|
|
|
//@ compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values)
|
2024-05-20 04:44:09 -05:00
|
|
|
//@ compile-flags: --check-cfg=cfg(quote,values("quote"))
|
2023-04-30 12:09:15 -05:00
|
|
|
|
|
|
|
#[cfg(featur)]
|
|
|
|
//~^ WARNING unexpected `cfg` condition name
|
|
|
|
fn feature() {}
|
|
|
|
|
|
|
|
#[cfg(featur = "foo")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition name
|
|
|
|
fn feature() {}
|
|
|
|
|
|
|
|
#[cfg(featur = "fo")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition name
|
|
|
|
fn feature() {}
|
|
|
|
|
|
|
|
#[cfg(feature = "foo")]
|
|
|
|
fn feature() {}
|
|
|
|
|
|
|
|
#[cfg(no_value)]
|
|
|
|
//~^ WARNING unexpected `cfg` condition name
|
|
|
|
fn no_values() {}
|
|
|
|
|
|
|
|
#[cfg(no_value = "foo")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition name
|
|
|
|
fn no_values() {}
|
|
|
|
|
|
|
|
#[cfg(no_values = "bar")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
|
|
fn no_values() {}
|
|
|
|
|
2024-05-20 04:44:09 -05:00
|
|
|
#[cfg(quote = "quote\"")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
|
|
fn no_values() {}
|
|
|
|
|
2023-04-30 12:09:15 -05:00
|
|
|
fn main() {}
|