]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/local-modularized-tricky-fail-2.rs
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / imports / local-modularized-tricky-fail-2.rs
1 // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution and at
3 // http://rust-lang.org/COPYRIGHT.
4 //
5 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8 // option. This file may not be copied, modified, or distributed
9 // except according to those terms.
10
11 // `#[macro_export] macro_rules` that doesn't originate from macro expansions can be placed
12 // into the root module soon enough to act as usual items and shadow globs and preludes.
13
14 #![feature(decl_macro)]
15
16 // `macro_export` shadows globs
17 use inner1::*;
18
19 mod inner1 {
20     pub macro exported() {}
21 }
22
23 exported!();
24
25 mod deep {
26     fn deep() {
27         type Deeper = [u8; {
28             #[macro_export]
29             macro_rules! exported {
30                 () => ( struct Б; ) //~ ERROR non-ascii idents are not fully supported
31             }
32
33             0
34         }];
35     }
36 }
37
38 // `macro_export` shadows std prelude
39 fn main() {
40     panic!();
41 }
42
43 mod inner3 {
44     #[macro_export]
45     macro_rules! panic {
46         () => ( struct Г; ) //~ ERROR non-ascii idents are not fully supported
47     }
48 }
49
50 // `macro_export` shadows builtin macros
51 include!();
52
53 mod inner4 {
54     #[macro_export]
55     macro_rules! include {
56         () => ( struct Д; ) //~ ERROR non-ascii idents are not fully supported
57     }
58 }