mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
517374150c
this directive prevents compiletest from adding any implicit and automatic --check-cfg arguments
18 lines
425 B
Rust
18 lines
425 B
Rust
//@ check-pass
|
|
//@ no-auto-check-cfg
|
|
//@ compile-flags: --check-cfg=cfg(my_cfg,values("foo")) --check-cfg=cfg(my_cfg,values("bar"))
|
|
//@ compile-flags: --check-cfg=cfg(my_cfg,values())
|
|
|
|
#[cfg(my_cfg)]
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
fn my_cfg() {}
|
|
|
|
#[cfg(my_cfg = "unk")]
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
fn my_cfg() {}
|
|
|
|
#[cfg(any(my_cfg = "foo", my_cfg = "bar"))]
|
|
fn foo_and_bar() {}
|
|
|
|
fn main() {}
|