]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/macro-shadowing-relaxed.rs
Rollup merge of #57107 - mjbshaw:thread_local_test, r=nikomatsakis
[rust.git] / src / test / ui / macros / macro-shadowing-relaxed.rs
1 // compile-pass
2 // aux-build:macro-in-other-crate.rs
3
4 #![feature(decl_macro)]
5
6 macro_rules! my_include {() => {
7     // Outer
8     macro m() {}
9     #[macro_use(from_prelude)] extern crate macro_in_other_crate;
10
11     fn inner() {
12         // Inner
13         macro m() {}
14         macro_rules! from_prelude { () => {} }
15
16         // OK, both `m` and `from_prelude` are macro-expanded,
17         // but no more macro-expanded than their counterpart from outer scope.
18         m!();
19         from_prelude!();
20     }
21 }}
22
23 my_include!();
24
25 fn main() {}