rust/tests/ui/check-cfg/order-independant.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
452 B
Rust
Raw Normal View History

//@ check-pass
//
//@ revisions: values_before values_after
//@ compile-flags: -Z unstable-options
//@ compile-flags: --check-cfg=cfg(values_before,values_after)
//
//@ [values_before]compile-flags: --check-cfg=cfg(a,values("b")) --check-cfg=cfg(a)
//@ [values_after]compile-flags: --check-cfg=cfg(a) --check-cfg=cfg(a,values("b"))
#[cfg(a)]
fn my_cfg() {}
#[cfg(a = "unk")]
//~^ WARNING unexpected `cfg` condition value
fn my_cfg() {}
fn main() {}