2023-05-01 07:16:38 -05:00
|
|
|
//@ check-pass
|
|
|
|
//@ compile-flags: -Z unstable-options
|
|
|
|
//@ compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar"))
|
2024-01-13 05:18:51 -06:00
|
|
|
//@ compile-flags: --check-cfg=cfg(my_cfg,values())
|
2023-05-01 07:16:38 -05:00
|
|
|
|
|
|
|
#[cfg(my_cfg)]
|
|
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
|
|
fn my_cfg() {}
|
|
|
|
|
|
|
|
#[cfg(my_cfg = "unk")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
|
|
fn my_cfg() {}
|
|
|
|
|
2024-01-13 05:18:51 -06:00
|
|
|
#[cfg(any(my_cfg = "foo", my_cfg = "bar"))]
|
|
|
|
fn foo_and_bar() {}
|
|
|
|
|
2023-05-01 07:16:38 -05:00
|
|
|
fn main() {}
|