]> git.lizzy.rs Git - rust.git/blob - src/test/ui/macros/restricted-shadowing-legacy.stderr
resolve: Suggest `crate::` for resolving ambiguities when appropriate
[rust.git] / src / test / ui / macros / restricted-shadowing-legacy.stderr
1 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
2   --> $DIR/restricted-shadowing-legacy.rs:101:13
3    |
4 LL |             m!(); //~ ERROR `m` is ambiguous
5    |             ^ ambiguous name
6 ...
7 LL | include!();
8    | ----------- in this macro invocation
9    |
10 note: `m` could refer to the macro defined here
11   --> $DIR/restricted-shadowing-legacy.rs:88:9
12    |
13 LL |         macro_rules! m { () => { Right } }
14    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
15 ...
16 LL | include!();
17    | ----------- in this macro invocation
18 note: `m` could also refer to the macro defined here
19   --> $DIR/restricted-shadowing-legacy.rs:97:9
20    |
21 LL |         macro_rules! m { () => {} }
22    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
23 ...
24 LL | include!();
25    | ----------- in this macro invocation
26
27 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
28   --> $DIR/restricted-shadowing-legacy.rs:139:42
29    |
30 LL |         macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous
31    |                                          ^ ambiguous name
32 ...
33 LL | include!();
34    | ----------- in this macro invocation
35    |
36 note: `m` could refer to the macro defined here
37   --> $DIR/restricted-shadowing-legacy.rs:88:9
38    |
39 LL |         macro_rules! m { () => { Right } }
40    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41 ...
42 LL | include!();
43    | ----------- in this macro invocation
44 note: `m` could also refer to the macro defined here
45   --> $DIR/restricted-shadowing-legacy.rs:135:9
46    |
47 LL |         macro_rules! m { () => {} }
48    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
49 ...
50 LL | include!();
51    | ----------- in this macro invocation
52
53 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
54   --> $DIR/restricted-shadowing-legacy.rs:148:9
55    |
56 LL |         m!(); //~ ERROR `m` is ambiguous
57    |         ^ ambiguous name
58 ...
59 LL | include!();
60    | ----------- in this macro invocation
61    |
62 note: `m` could refer to the macro defined here
63   --> $DIR/restricted-shadowing-legacy.rs:88:9
64    |
65 LL |         macro_rules! m { () => { Right } }
66    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
67 ...
68 LL | include!();
69    | ----------- in this macro invocation
70 note: `m` could also refer to the macro defined here
71   --> $DIR/restricted-shadowing-legacy.rs:144:9
72    |
73 LL |         macro_rules! m { () => {} }
74    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
75 ...
76 LL | include!();
77    | ----------- in this macro invocation
78
79 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
80   --> $DIR/restricted-shadowing-legacy.rs:164:9
81    |
82 LL |         m!(); //~ ERROR `m` is ambiguous
83    |         ^ ambiguous name
84 ...
85 LL | include!();
86    | ----------- in this macro invocation
87    |
88 note: `m` could refer to the macro defined here
89   --> $DIR/restricted-shadowing-legacy.rs:88:9
90    |
91 LL |         macro_rules! m { () => { Right } }
92    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93 ...
94 LL | include!();
95    | ----------- in this macro invocation
96 note: `m` could also refer to the macro defined here
97   --> $DIR/restricted-shadowing-legacy.rs:85:9
98    |
99 LL |         macro_rules! m { () => { Wrong } }
100    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
101 ...
102 LL | include!();
103    | ----------- in this macro invocation
104
105 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
106   --> $DIR/restricted-shadowing-legacy.rs:180:13
107    |
108 LL |             m!(); //~ ERROR `m` is ambiguous
109    |             ^ ambiguous name
110 ...
111 LL | include!();
112    | ----------- in this macro invocation
113    |
114 note: `m` could refer to the macro defined here
115   --> $DIR/restricted-shadowing-legacy.rs:88:9
116    |
117 LL |         macro_rules! m { () => { Right } }
118    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119 ...
120 LL | include!();
121    | ----------- in this macro invocation
122 note: `m` could also refer to the macro defined here
123   --> $DIR/restricted-shadowing-legacy.rs:85:9
124    |
125 LL |         macro_rules! m { () => { Wrong } }
126    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
127 ...
128 LL | include!();
129    | ----------- in this macro invocation
130
131 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
132   --> $DIR/restricted-shadowing-legacy.rs:218:42
133    |
134 LL |         macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous
135    |                                          ^ ambiguous name
136 ...
137 LL | include!();
138    | ----------- in this macro invocation
139    |
140 note: `m` could refer to the macro defined here
141   --> $DIR/restricted-shadowing-legacy.rs:88:9
142    |
143 LL |         macro_rules! m { () => { Right } }
144    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145 ...
146 LL | include!();
147    | ----------- in this macro invocation
148 note: `m` could also refer to the macro defined here
149   --> $DIR/restricted-shadowing-legacy.rs:85:9
150    |
151 LL |         macro_rules! m { () => { Wrong } }
152    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153 ...
154 LL | include!();
155    | ----------- in this macro invocation
156
157 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
158   --> $DIR/restricted-shadowing-legacy.rs:232:9
159    |
160 LL |         m!(); //~ ERROR `m` is ambiguous
161    |         ^ ambiguous name
162 ...
163 LL | include!();
164    | ----------- in this macro invocation
165    |
166 note: `m` could refer to the macro defined here
167   --> $DIR/restricted-shadowing-legacy.rs:88:9
168    |
169 LL |         macro_rules! m { () => { Right } }
170    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
171 ...
172 LL | include!();
173    | ----------- in this macro invocation
174 note: `m` could also refer to the macro defined here
175   --> $DIR/restricted-shadowing-legacy.rs:227:13
176    |
177 LL |             macro_rules! m { () => {} }
178    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
179 ...
180 LL | include!();
181    | ----------- in this macro invocation
182
183 error[E0659]: `m` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
184   --> $DIR/restricted-shadowing-legacy.rs:262:42
185    |
186 LL |         macro_rules! gen_invoc { () => { m!() } } //~ ERROR `m` is ambiguous
187    |                                          ^ ambiguous name
188 ...
189 LL | include!();
190    | ----------- in this macro invocation
191    |
192 note: `m` could refer to the macro defined here
193   --> $DIR/restricted-shadowing-legacy.rs:88:9
194    |
195 LL |         macro_rules! m { () => { Right } }
196    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
197 ...
198 LL | include!();
199    | ----------- in this macro invocation
200 note: `m` could also refer to the macro defined here
201   --> $DIR/restricted-shadowing-legacy.rs:257:13
202    |
203 LL |             macro_rules! m { () => {} }
204    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^
205 ...
206 LL | include!();
207    | ----------- in this macro invocation
208
209 error: aborting due to 8 previous errors
210
211 For more information about this error, try `rustc --explain E0659`.