2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2013-06-22 13:20:00 +10:00
|
|
|
|
|
|
|
// check that cfg correctly chooses between the macro impls (see also
|
|
|
|
// cfg-macros-foo.rs)
|
|
|
|
|
2025-03-29 17:24:03 +00:00
|
|
|
#[cfg(false)]
|
2014-12-18 20:48:26 -08:00
|
|
|
#[macro_use]
|
2013-06-22 13:20:00 +10:00
|
|
|
mod foo {
|
|
|
|
macro_rules! bar {
|
|
|
|
() => { true }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-07 00:43:00 +02:00
|
|
|
#[cfg(not(FALSE))]
|
2014-12-18 20:48:26 -08:00
|
|
|
#[macro_use]
|
2013-06-22 13:20:00 +10:00
|
|
|
mod foo {
|
|
|
|
macro_rules! bar {
|
|
|
|
() => { false }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-03 15:30:54 -08:00
|
|
|
pub fn main() {
|
2013-06-22 13:20:00 +10:00
|
|
|
assert!(!bar!())
|
|
|
|
}
|