about summary refs log tree commit diff
path: root/tests/ui/conditional-compilation/test-cfg.rs
blob: adbbc309be4471d6287372c6f3d7cd8eea12e1d8 (plain)
1
2
3
4
5
6
7
8
//@ compile-flags: --cfg foo --check-cfg=cfg(foo,bar)

#[cfg(all(foo, bar))] // foo AND bar
fn foo() {}

fn main() {
    foo(); //~ ERROR cannot find function `foo` in this scope
}