rust/tests/ui/check-cfg/exhaustive-values.rs
Urgau 517374150c compiletest: add no-auto-check-cfg directive
this directive prevents compiletest from adding any implicit and
automatic --check-cfg arguments
2024-05-04 11:30:38 +02:00

14 lines
324 B
Rust

// Check warning for unexpected cfg value
//
//@ check-pass
//@ no-auto-check-cfg
//@ revisions: empty_cfg without_names
//@ [empty_cfg]compile-flags: --check-cfg=cfg()
//@ [without_names]compile-flags: --check-cfg=cfg(any())
#[cfg(test = "value")]
//~^ WARNING unexpected `cfg` condition value
pub fn f() {}
fn main() {}