2017-12-10 13:47:55 -06:00
|
|
|
error: `macro_two` is already in scope
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/macro-shadowing.rs:22:5
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | #[macro_use] //~ ERROR `macro_two` is already in scope
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^^^^^^^
|
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | m1!();
|
2017-12-10 13:47:55 -06:00
|
|
|
| ------ in this macro invocation
|
|
|
|
|
|
|
|
|
= note: macro-expanded `#[macro_use]`s may not shadow existing macros (see RFC 1560)
|
|
|
|
|
2018-08-27 17:41:07 -05:00
|
|
|
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
|
2017-12-10 13:47:55 -06:00
|
|
|
--> $DIR/macro-shadowing.rs:20:5
|
|
|
|
|
|
2018-08-27 17:41:07 -05:00
|
|
|
LL | macro_rules! foo { () => {} }
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
...
|
2018-02-22 18:42:32 -06:00
|
|
|
LL | m1!();
|
2017-12-10 13:47:55 -06:00
|
|
|
| ------ in this macro invocation
|
2018-08-27 17:41:07 -05:00
|
|
|
note: `foo` could also refer to the name defined here
|
|
|
|
--> $DIR/macro-shadowing.rs:15:1
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2018-08-27 17:41:07 -05:00
|
|
|
LL | macro_rules! foo { () => {} }
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= note: macro-expanded macros do not shadow
|
2017-12-10 13:47:55 -06:00
|
|
|
|
2018-08-27 18:20:59 -05:00
|
|
|
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
|
2017-12-10 13:47:55 -06:00
|
|
|
|
2018-08-27 17:41:07 -05:00
|
|
|
For more information about this error, try `rustc --explain E0659`.
|