2023-04-30 12:09:15 -05:00
|
|
|
// check-pass
|
2023-05-01 07:16:38 -05:00
|
|
|
// compile-flags: --check-cfg=cfg(feature,values("foo")) --check-cfg=cfg(no_values) -Z unstable-options
|
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() {}
|
|
|
|
|
|
|
|
fn main() {}
|