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

9 lines
155 B
Rust
Raw Normal View History

2013-03-19 20:00:10 +00:00
// compile-flags: --cfg foo
#[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
}