resolve: Merge resolution for macro_rules into the common early in-scope resolution function
`fn resolve_legacy_scope`/`fn resolve_lexical_macro_path_segment` -> `fn early_resolve_ident_in_lexical_scope`
This commit is contained in:
parent
05a46815e4
commit
050bd32958
6 changed files with 173 additions and 253 deletions
|
|
@ -34,6 +34,23 @@ LL | use two_macros::m;
|
|||
| ^^^^^^^^^^^^^
|
||||
= note: macro-expanded macro imports do not shadow
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error[E0659]: `m` is ambiguous
|
||||
--> $DIR/macros.rs:48:5
|
||||
|
|
||||
LL | m!(); //~ ERROR ambiguous
|
||||
| ^ ambiguous name
|
||||
|
|
||||
note: `m` could refer to the name defined here
|
||||
--> $DIR/macros.rs:46:5
|
||||
|
|
||||
LL | macro_rules! m { () => {} }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
note: `m` could also refer to the name imported here
|
||||
--> $DIR/macros.rs:47:9
|
||||
|
|
||||
LL | use two_macros::m;
|
||||
| ^^^^^^^^^^^^^
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0659`.
|
||||
|
|
|
|||
|
|
@ -1,20 +1,3 @@
|
|||
error[E0659]: `panic` is ambiguous
|
||||
--> $DIR/shadow_builtin_macros.rs:43:5
|
||||
|
|
||||
LL | panic!(); //~ ERROR `panic` is ambiguous
|
||||
| ^^^^^ ambiguous name
|
||||
|
|
||||
note: `panic` could refer to the name defined here
|
||||
--> $DIR/shadow_builtin_macros.rs:40:9
|
||||
|
|
||||
LL | macro_rules! panic { () => {} }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | } }
|
||||
LL | m!();
|
||||
| ----- in this macro invocation
|
||||
= note: `panic` is also a builtin macro
|
||||
= note: macro-expanded macros do not shadow
|
||||
|
||||
error[E0659]: `panic` is ambiguous
|
||||
--> $DIR/shadow_builtin_macros.rs:25:14
|
||||
|
|
||||
|
|
@ -43,6 +26,23 @@ LL | ::two_macros::m!(use foo::panic;);
|
|||
= note: `panic` is also a builtin macro
|
||||
= note: macro-expanded macro imports do not shadow
|
||||
|
||||
error[E0659]: `panic` is ambiguous
|
||||
--> $DIR/shadow_builtin_macros.rs:43:5
|
||||
|
|
||||
LL | panic!(); //~ ERROR `panic` is ambiguous
|
||||
| ^^^^^ ambiguous name
|
||||
|
|
||||
note: `panic` could refer to the name defined here
|
||||
--> $DIR/shadow_builtin_macros.rs:40:9
|
||||
|
|
||||
LL | macro_rules! panic { () => {} }
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
LL | } }
|
||||
LL | m!();
|
||||
| ----- in this macro invocation
|
||||
= note: `panic` is also a builtin macro
|
||||
= note: macro-expanded macros do not shadow
|
||||
|
||||
error[E0659]: `n` is ambiguous
|
||||
--> $DIR/shadow_builtin_macros.rs:59:5
|
||||
|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue