]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/local-modularized-tricky-fail-1.rs
Preparing for merge from rustc
[rust.git] / src / test / ui / imports / local-modularized-tricky-fail-1.rs
1 #![feature(decl_macro)]
2
3 macro_rules! define_exported { () => {
4     #[macro_export]
5     macro_rules! exported {
6         () => ()
7     }
8 }}
9 macro_rules! define_panic { () => {
10     #[macro_export]
11     macro_rules! panic {
12         () => ()
13     }
14 }}
15 macro_rules! define_include { () => {
16     #[macro_export]
17     macro_rules! include {
18         () => ()
19     }
20 }}
21
22 use inner1::*;
23
24 mod inner1 {
25     pub macro exported() {}
26 }
27
28 exported!(); //~ ERROR `exported` is ambiguous
29              //~| ERROR `exported` is ambiguous
30
31 mod inner2 {
32     define_exported!();
33 }
34
35 fn main() {
36     panic!(); //~ ERROR `panic` is ambiguous
37 }
38
39 mod inner3 {
40     define_panic!();
41 }
42
43 mod inner4 {
44     define_include!();
45 }
46
47 include!(); //~ ERROR `include` is ambiguous