We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00588c7 commit 50b110bCopy full SHA for 50b110b
src/names/name-resolution.md
@@ -283,15 +283,19 @@ r[names.resolution.expansion.imports.ambiguity.path-vs-textual-macro]
283
Path-based scope bindings for macros may not shadow textual scope bindings to macros.
284
285
```rust,compile_fail,E0659
286
-macro_rules! m2 {
+macro_rules! ambig {
287
+// ^---- textual macro candidate
288
() => {}
289
}
-macro_rules! m {
290
+
291
+macro_rules! path_based {
292
+// ^--- path-based macro candidate
293
294
295
296
pub fn foo() {
- m!(); // ERROR: `m` is ambiguous
- use m2 as m; // In scope for entire function body.
297
+ ambig!(); // ERROR: `ambig` is ambiguous
298
+ use path_based as ambig; // In scope for entire function body.
299
300
```
301
0 commit comments