]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/shadow_builtin_macros.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / imports / shadow_builtin_macros.stderr
1 error[E0659]: `panic` is ambiguous
2   --> $DIR/shadow_builtin_macros.rs:43:5
3    |
4 LL |     panic!(); //~ ERROR `panic` is ambiguous
5    |     ^^^^^ ambiguous name
6    |
7 note: `panic` could refer to the name defined here
8   --> $DIR/shadow_builtin_macros.rs:40:9
9    |
10 LL |         macro_rules! panic { () => {} }
11    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12 LL |     } }
13 LL |     m!();
14    |     ----- in this macro invocation
15    = note: `panic` is also a builtin macro
16    = note: macro-expanded macros do not shadow
17
18 error[E0659]: `panic` is ambiguous
19   --> $DIR/shadow_builtin_macros.rs:25:14
20    |
21 LL |     fn f() { panic!(); } //~ ERROR ambiguous
22    |              ^^^^^ ambiguous name
23    |
24 note: `panic` could refer to the name imported here
25   --> $DIR/shadow_builtin_macros.rs:24:9
26    |
27 LL |     use foo::*;
28    |         ^^^^^^
29    = note: `panic` is also a builtin macro
30    = note: consider adding an explicit import of `panic` to disambiguate
31
32 error[E0659]: `panic` is ambiguous
33   --> $DIR/shadow_builtin_macros.rs:30:14
34    |
35 LL |     fn f() { panic!(); } //~ ERROR ambiguous
36    |              ^^^^^ ambiguous name
37    |
38 note: `panic` could refer to the name imported here
39   --> $DIR/shadow_builtin_macros.rs:29:26
40    |
41 LL |     ::two_macros::m!(use foo::panic;);
42    |                          ^^^^^^^^^^
43    = note: `panic` is also a builtin macro
44    = note: macro-expanded macro imports do not shadow
45
46 error[E0659]: `n` is ambiguous
47   --> $DIR/shadow_builtin_macros.rs:59:5
48    |
49 LL |     n!(); //~ ERROR ambiguous
50    |     ^ ambiguous name
51    |
52 note: `n` could refer to the name imported here
53   --> $DIR/shadow_builtin_macros.rs:58:9
54    |
55 LL |     use bar::*;
56    |         ^^^^^^
57 note: `n` could also refer to the name imported here
58   --> $DIR/shadow_builtin_macros.rs:46:13
59    |
60 LL | #[macro_use(n)]
61    |             ^
62    = note: consider adding an explicit import of `n` to disambiguate
63
64 error: aborting due to 4 previous errors
65
66 For more information about this error, try `rustc --explain E0659`.