rust/tests/ui/conditional-compilation/test-cfg.rs

9 lines
156 B
Rust
Raw Normal View History

//@ compile-flags: --cfg foo
2013-03-19 20:00:10 +00:00
#[cfg(all(foo, bar))] // foo AND bar
2013-03-19 20:00:10 +00:00
fn foo() {}
fn main() {
foo(); //~ ERROR cannot find function `foo` in this scope
2013-03-19 20:00:10 +00:00
}