]> git.lizzy.rs Git - rust.git/blob - tests/ui/imports/shadow_builtin_macros.stderr
Rollup merge of #106769 - lenko-d:libtest-print_why_a_test_was_ignored_if_its_the_onl...
[rust.git] / tests / ui / imports / shadow_builtin_macros.stderr
1 error[E0659]: `panic` is ambiguous
2   --> $DIR/shadow_builtin_macros.rs:15:14
3    |
4 LL |     fn f() { panic!(); }
5    |              ^^^^^ ambiguous name
6    |
7    = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
8    = note: `panic` could refer to a macro from prelude
9 note: `panic` could also refer to the macro imported here
10   --> $DIR/shadow_builtin_macros.rs:14:9
11    |
12 LL |     use foo::*;
13    |         ^^^^^^
14    = help: consider adding an explicit import of `panic` to disambiguate
15    = help: or use `self::panic` to refer to this macro unambiguously
16
17 error[E0659]: `panic` is ambiguous
18   --> $DIR/shadow_builtin_macros.rs:33:5
19    |
20 LL |     panic!();
21    |     ^^^^^ ambiguous name
22    |
23    = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
24    = note: `panic` could refer to a macro from prelude
25 note: `panic` could also refer to the macro defined here
26   --> $DIR/shadow_builtin_macros.rs:30:9
27    |
28 LL |         macro_rules! panic { () => {} }
29    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
30 LL |     } }
31 LL |     m!();
32    |     ---- in this macro invocation
33    = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
34
35 error[E0659]: `n` is ambiguous
36   --> $DIR/shadow_builtin_macros.rs:49:5
37    |
38 LL |     n!();
39    |     ^ ambiguous name
40    |
41    = note: ambiguous because of a conflict between a name from a glob import and an outer scope during import or macro resolution
42 note: `n` could refer to the macro imported here
43   --> $DIR/shadow_builtin_macros.rs:48:9
44    |
45 LL |     use bar::*;
46    |         ^^^^^^
47    = help: consider adding an explicit import of `n` to disambiguate
48    = help: or use `self::n` to refer to this macro unambiguously
49 note: `n` could also refer to the macro imported here
50   --> $DIR/shadow_builtin_macros.rs:36:13
51    |
52 LL | #[macro_use(n)]
53    |             ^
54
55 error[E0659]: `panic` is ambiguous
56   --> $DIR/shadow_builtin_macros.rs:20:14
57    |
58 LL |     fn f() { panic!(); }
59    |              ^^^^^ ambiguous name
60    |
61    = note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
62    = note: `panic` could refer to a macro from prelude
63 note: `panic` could also refer to the macro imported here
64   --> $DIR/shadow_builtin_macros.rs:19:26
65    |
66 LL |     ::two_macros::m!(use foo::panic;);
67    |                          ^^^^^^^^^^
68    = help: use `self::panic` to refer to this macro unambiguously
69
70 error: aborting due to 4 previous errors
71
72 For more information about this error, try `rustc --explain E0659`.