2019-06-08 08:36:43 +00:00
|
|
|
#![feature(rustc_attrs)]
|
2015-02-14 10:45:43 +00:00
|
|
|
|
2015-01-02 22:44:21 +00:00
|
|
|
macro_rules! test { ($nm:ident,
|
2014-03-26 23:14:07 +00:00
|
|
|
#[$a:meta],
|
2015-01-02 22:44:21 +00:00
|
|
|
$i:item) => (mod $nm { #[$a] $i }); }
|
2013-08-08 17:28:06 +00:00
|
|
|
|
|
|
|
test!(a,
|
2025-03-29 17:24:03 +00:00
|
|
|
#[cfg(false)],
|
2014-11-14 17:18:10 +00:00
|
|
|
pub fn bar() { });
|
2013-08-08 17:28:06 +00:00
|
|
|
|
|
|
|
test!(b,
|
2024-04-06 22:43:00 +00:00
|
|
|
#[cfg(not(FALSE))],
|
2014-11-14 17:18:10 +00:00
|
|
|
pub fn bar() { });
|
2013-08-08 17:28:06 +00:00
|
|
|
|
|
|
|
// test1!(#[bar])
|
2019-06-08 08:36:43 +00:00
|
|
|
#[rustc_dummy]
|
2013-08-08 17:28:06 +00:00
|
|
|
fn main() {
|
2017-01-11 22:18:08 +00:00
|
|
|
a::bar(); //~ ERROR cannot find function `bar` in module `a`
|
2013-08-08 17:28:06 +00:00
|
|
|
b::bar();
|
|
|
|
}
|