You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rollup merge of rust-lang#148612 - chenyukang:yukang-fix-148580-macro-hygiene-diagnostic, r=JonathanBrouwer
Add note for identifier with attempted hygiene violation
Fixesrust-lang#148580
I changed the original test to make sure we are pointing to the right scope.
help: an identifier with the same name exists, but is not accessible due to macro hygiene
11
+
--> $DIR/weird-hygiene.rs:44:9
12
+
|
13
+
LL | let hidden_ident = "Hello1";
14
+
| ^^^^^^^^^^^^
10
15
= note: this error originates in the macro `inner` which comes from the expansion of the macro `other` (in Nightly builds, run with -Z macro-backtrace for more info)
11
16
12
17
error[E0425]: cannot find value `hidden_ident` in this scope
@@ -18,6 +23,11 @@ LL | hidden_ident
18
23
LL | invoke_it!(25);
19
24
| -------------- in this macro invocation
20
25
|
26
+
help: an identifier with the same name exists, but is not accessible due to macro hygiene
27
+
--> $DIR/weird-hygiene.rs:44:9
28
+
|
29
+
LL | let hidden_ident = "Hello1";
30
+
| ^^^^^^^^^^^^
21
31
= note: this error originates in the macro `invoke_it` (in Nightly builds, run with -Z macro-backtrace for more info)
0 commit comments