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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

9 lines
156 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
}