rust/tests/ui/check-cfg/empty-values.rs

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

16 lines
322 B
Rust
Raw Normal View History

// Check that we detect unexpected value when none are allowed
//
//@ check-pass
//@ no-auto-check-cfg
//@ compile-flags: --check-cfg=cfg(foo,values())
#[cfg(foo = "foo")]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}
#[cfg(foo)]
//~^ WARNING unexpected `cfg` condition value
fn do_foo() {}
fn main() {}