rust/src/test/ui/macros/macro-shadowing.stderr

60 lines
1.6 KiB
Plaintext
Raw Normal View History

error: `macro_two` is already in scope
--> $DIR/macro-shadowing.rs:22:5
|
2018-02-22 18:42:32 -06:00
LL | #[macro_use] //~ ERROR `macro_two` is already in scope
| ^^^^^^^^^^^^
...
2018-02-22 18:42:32 -06:00
LL | m1!();
| ------ in this macro invocation
|
= note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560)
error[E0659]: `foo` is ambiguous
--> $DIR/macro-shadowing.rs:27:1
|
LL | foo!(); //~ ERROR `foo` is ambiguous
| ^^^
|
note: `foo` could refer to the name defined here
--> $DIR/macro-shadowing.rs:20:5
|
LL | macro_rules! foo { () => {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
2018-02-22 18:42:32 -06:00
LL | m1!();
| ------ in this macro invocation
note: `foo` could also refer to the name defined here
--> $DIR/macro-shadowing.rs:15:1
|
LL | macro_rules! foo { () => {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: macro-expanded macros do not shadow
error[E0659]: `foo` is ambiguous
--> $DIR/macro-shadowing.rs:31:5
|
LL | foo!(); //~ ERROR `foo` is ambiguous
| ^^^
|
note: `foo` could refer to the name defined here
--> $DIR/macro-shadowing.rs:30:5
|
LL | macro_rules! foo { () => {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | m2!();
| ------ in this macro invocation
note: `foo` could also refer to the name defined here
--> $DIR/macro-shadowing.rs:20:5
|
LL | macro_rules! foo { () => {} }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
LL | m1!();
| ------ in this macro invocation
= note: macro-expanded macros do not shadow
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0659`.