rust/tests/ui/cfg/cmdline-false.rs

9 lines
215 B
Rust

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