]> git.lizzy.rs Git - rust.git/blob - tests/ui/macros/macro-inner-attributes.rs
Rollup merge of #106970 - kylematsuda:earlybinder-item-bounds, r=lcnr
[rust.git] / tests / ui / macros / macro-inner-attributes.rs
1 #![feature(rustc_attrs)]
2
3 macro_rules! test { ($nm:ident,
4                      #[$a:meta],
5                      $i:item) => (mod $nm { #![$a] $i }); }
6
7 test!(a,
8       #[cfg(qux)],
9       pub fn bar() { });
10
11 test!(b,
12       #[cfg(not(qux))],
13       pub fn bar() { });
14
15 #[rustc_dummy]
16 fn main() {
17     a::bar();
18     //~^ ERROR failed to resolve: use of undeclared crate or module `a`
19     b::bar();
20 }