2017-12-10 13:47:55 -06:00
|
|
|
error: `panic` is already in scope
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:42:9
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
42 | macro_rules! panic { () => {} } //~ ERROR `panic` is already in scope
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2017-12-10 14:29:24 -06:00
|
|
|
43 | } }
|
|
|
|
44 | m!();
|
2017-12-10 13:47:55 -06:00
|
|
|
| ----- in this macro invocation
|
|
|
|
|
|
|
|
|
= note: macro-expanded `macro_rules!`s may not shadow existing macros (see RFC 1560)
|
|
|
|
|
2018-01-16 17:00:17 -06:00
|
|
|
error[E0659]: `panic` is ambiguous
|
2017-12-10 13:47:55 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:27:14
|
|
|
|
|
|
|
|
|
27 | fn f() { panic!(); } //~ ERROR ambiguous
|
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: `panic` could refer to the name imported here
|
|
|
|
--> $DIR/shadow_builtin_macros.rs:26:9
|
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
26 | use foo::*;
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^
|
|
|
|
= note: `panic` is also a builtin macro
|
|
|
|
= note: consider adding an explicit import of `panic` to disambiguate
|
|
|
|
|
2018-01-16 17:00:17 -06:00
|
|
|
error[E0659]: `panic` is ambiguous
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:32:14
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
32 | fn f() { panic!(); } //~ ERROR ambiguous
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^
|
|
|
|
|
|
|
|
|
note: `panic` could refer to the name imported here
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:31:26
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
31 | ::two_macros::m!(use foo::panic;);
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^^^^^
|
|
|
|
= note: `panic` is also a builtin macro
|
|
|
|
= note: macro-expanded macro imports do not shadow
|
|
|
|
|
2018-01-16 17:00:17 -06:00
|
|
|
error[E0659]: `n` is ambiguous
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:61:5
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
61 | n!(); //~ ERROR ambiguous
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^
|
|
|
|
|
|
|
|
|
note: `n` could refer to the name imported here
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:60:9
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
60 | use bar::*;
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^^^^^^
|
|
|
|
note: `n` could also refer to the name imported here
|
2017-12-10 14:29:24 -06:00
|
|
|
--> $DIR/shadow_builtin_macros.rs:48:13
|
2017-12-10 13:47:55 -06:00
|
|
|
|
|
2017-12-10 14:29:24 -06:00
|
|
|
48 | #[macro_use(n)]
|
2017-12-10 13:47:55 -06:00
|
|
|
| ^
|
|
|
|
= note: consider adding an explicit import of `n` to disambiguate
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
2018-02-19 14:40:25 -06:00
|
|
|
If you want more information on this error, try using "rustc --explain E0659"
|