]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/local-modularized-tricky-fail-2.rs
Rollup merge of #57132 - daxpedda:master, r=steveklabnik
[rust.git] / src / test / ui / imports / local-modularized-tricky-fail-2.rs
1 // `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed
2 // into the root module soon enough to act as usual items and shadow globs and preludes.
3
4 #![feature(decl_macro)]
5
6 // `macro_export` shadows globs
7 use inner1::*;
8
9 mod inner1 {
10     pub macro exported() {}
11 }
12
13 exported!();
14
15 mod deep {
16     fn deep() {
17         type Deeper = [u8; {
18             #[macro_export]
19             macro_rules! exported {
20                 () => ( struct Б; ) //~ ERROR non-ascii idents are not fully supported
21             }
22
23             0
24         }];
25     }
26 }
27
28 // `macro_export` shadows std prelude
29 fn main() {
30     panic!();
31 }
32
33 mod inner3 {
34     #[macro_export]
35     macro_rules! panic {
36         () => ( struct Г; ) //~ ERROR non-ascii idents are not fully supported
37     }
38 }
39
40 // `macro_export` shadows builtin macros
41 include!();
42
43 mod inner4 {
44     #[macro_export]
45     macro_rules! include {
46         () => ( struct Д; ) //~ ERROR non-ascii idents are not fully supported
47     }
48 }