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

#[cfg(all(foo, bar))] // foo AND bar
//~^ NOTE the item is gated here
fn foo() {} //~ NOTE found an item that was configured out

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