]> git.proxmox.com Git - rustc.git/blob - tests/ui/imports/local-modularized-tricky-fail-1.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / 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
30 mod inner2 {
31 define_exported!();
32 }
33
34 fn main() {
35 panic!(); //~ ERROR `panic` is ambiguous
36 }
37
38 mod inner3 {
39 define_panic!();
40 }
41
42 mod inner4 {
43 define_include!();
44 }
45
46 include!(); //~ ERROR `include` is ambiguous