about summary refs log tree commit diff
path: root/tests/ui/cfg/cmdline-false.rs
blob: d4b7d3bbfdca2ee42f3ca178b74b9c974feef954 (plain)
1
2
3
4
5
6
7
8
9
/// 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
}