rust/tests/ui/cfg/cmdline-false.rs
2025-04-03 18:10:48 +00:00

9 lines
213 B
Rust

/// Test that `--cfg false` doesn't cause `cfg(false)` to evaluate to `true`
//@ compile-flags: --cfg false
#[cfg(false)]
fn foo() {}
fn main() {
foo(); //~ ERROR cannot find function `foo` in this scope
}