2023-05-01 07:16:38 -05:00
|
|
|
// Check that we detect unexpected value when none are allowed
|
|
|
|
//
|
|
|
|
//@ check-pass
|
2024-04-09 07:07:30 -05:00
|
|
|
//@ no-auto-check-cfg
|
2023-11-16 11:41:45 -06:00
|
|
|
//@ revisions: simple mixed empty
|
2023-05-01 07:16:38 -05:00
|
|
|
//@ compile-flags: --check-cfg=cfg(values,simple,mixed,empty)
|
|
|
|
//@ [simple]compile-flags: --check-cfg=cfg(test) --check-cfg=cfg(feature)
|
|
|
|
//@ [mixed]compile-flags: --check-cfg=cfg(test,feature)
|
2023-12-29 16:16:10 -06:00
|
|
|
//@ [empty]compile-flags: --check-cfg=cfg(test,feature,values(none()))
|
2023-05-01 07:16:38 -05:00
|
|
|
|
|
|
|
#[cfg(feature = "foo")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
|
|
fn do_foo() {}
|
|
|
|
|
|
|
|
#[cfg(test = "foo")]
|
|
|
|
//~^ WARNING unexpected `cfg` condition value
|
|
|
|
fn do_foo() {}
|
|
|
|
|
|
|
|
fn main() {}
|