2018-08-30 12:18:55 +00:00
|
|
|
//@ run-pass
|
2013-06-22 03:20:00 +00: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-19 04:48:26 +00:00
|
|
|
#[macro_use]
|
2013-06-22 03:20:00 +00:00
|
|
|
mod foo {
|
|
|
|
macro_rules! bar {
|
|
|
|
() => { true }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-06 22:43:00 +00:00
|
|
|
#[cfg(not(FALSE))]
|
2014-12-19 04:48:26 +00:00
|
|
|
#[macro_use]
|
2013-06-22 03:20:00 +00:00
|
|
|
mod foo {
|
|
|
|
macro_rules! bar {
|
|
|
|
() => { false }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-01-03 23:30:54 +00:00
|
|
|
pub fn main() {
|
2013-06-22 03:20:00 +00:00
|
|
|
assert!(!bar!())
|
|
|
|
}
|