mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 08:05:12 +00:00
25 lines
336 B
Rust
25 lines
336 B
Rust
//@ run-pass
|
|
|
|
// check that cfg correctly chooses between the macro impls (see also
|
|
// cfg-macros-foo.rs)
|
|
|
|
#[cfg(FALSE)]
|
|
#[macro_use]
|
|
mod foo {
|
|
macro_rules! bar {
|
|
() => { true }
|
|
}
|
|
}
|
|
|
|
#[cfg(not(FALSE))]
|
|
#[macro_use]
|
|
mod foo {
|
|
macro_rules! bar {
|
|
() => { false }
|
|
}
|
|
}
|
|
|
|
pub fn main() {
|
|
assert!(!bar!())
|
|
}
|