]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/out-of-order-shadowing.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / out-of-order-shadowing.stderr
index 78e32e23ff6365896f4d5a894d421b2c548288fd..d96a802cb3f8f66b3a90707390534021e433cce2 100644 (file)
@@ -1,11 +1,22 @@
-error: `bar` is already in scope
+error[E0659]: `bar` is ambiguous
   --> $DIR/out-of-order-shadowing.rs:15:1
    |
+LL | bar!(); //~ ERROR `bar` is ambiguous
+   | ^^^ ambiguous name
+   |
+note: `bar` could refer to the name defined here
+  --> $DIR/out-of-order-shadowing.rs:14:1
+   |
 LL | define_macro!(bar);
    | ^^^^^^^^^^^^^^^^^^^
+note: `bar` could also refer to the name defined here
+  --> $DIR/out-of-order-shadowing.rs:13:1
    |
-   = note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560)
+LL | macro_rules! bar { () => {} }
+   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+   = note: macro-expanded macros do not shadow
    = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
 
 error: aborting due to previous error
 
+For more information about this error, try `rustc --explain E0659`.