blob: 0752f7e3153c19e5b7ac870bf4185b4fa6235a12 [file] [log] [blame]
#![feature(rustc_attrs)]
macro_rules! test { ($nm:ident,
#[$a:meta],
$i:item) => (mod $nm { #[$a] $i }); }
test!(a,
#[cfg(qux)],
pub fn bar() { });
test!(b,
#[cfg(not(qux))],
pub fn bar() { });
// test1!(#[bar])
#[rustc_dummy]
fn main() {
a::bar(); //~ ERROR cannot find function `bar` in module `a`
b::bar();
}