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
Auto merge of #90075 - pierwill:fix-79717, r=petrochenkov
Edit error messages for `rustc_resolve::AmbiguityKind` variants
Edit the language of the ambiguity descriptions for E0659. These strings now appear as notes.
Closes#79717.
= note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
18
19
note: `Vec` could refer to the crate imported here
Copy file name to clipboardExpand all lines: src/test/ui/imports/local-modularized-tricky-fail-1.stderr
+8-4
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
-
error[E0659]: `exported` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution)
1
+
error[E0659]: `exported` is ambiguous
2
2
--> $DIR/local-modularized-tricky-fail-1.rs:28:1
3
3
|
4
4
LL | exported!();
5
5
| ^^^^^^^^ ambiguous name
6
6
|
7
+
= note: ambiguous because of a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution
7
8
note: `exported` could refer to the macro defined here
8
9
--> $DIR/local-modularized-tricky-fail-1.rs:5:5
9
10
|
@@ -22,12 +23,13 @@ LL | use inner1::*;
22
23
= help: consider adding an explicit import of `exported` to disambiguate
23
24
= note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
24
25
25
-
error[E0659]: `exported` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution)
26
+
error[E0659]: `exported` is ambiguous
26
27
--> $DIR/local-modularized-tricky-fail-1.rs:28:1
27
28
|
28
29
LL | exported!();
29
30
| ^^^^^^^^ ambiguous name
30
31
|
32
+
= note: ambiguous because of a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution
31
33
note: `exported` could refer to the macro defined here
32
34
--> $DIR/local-modularized-tricky-fail-1.rs:5:5
33
35
|
@@ -46,12 +48,13 @@ LL | use inner1::*;
46
48
= help: consider adding an explicit import of `exported` to disambiguate
47
49
= note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
48
50
49
-
error[E0659]: `panic` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
51
+
error[E0659]: `panic` is ambiguous
50
52
--> $DIR/local-modularized-tricky-fail-1.rs:36:5
51
53
|
52
54
LL | panic!();
53
55
| ^^^^^ ambiguous name
54
56
|
57
+
= note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
55
58
= note: `panic` could refer to a macro from prelude
56
59
note: `panic` could also refer to the macro defined here
57
60
--> $DIR/local-modularized-tricky-fail-1.rs:11:5
@@ -66,12 +69,13 @@ LL | define_panic!();
66
69
= help: use `crate::panic` to refer to this macro unambiguously
67
70
= note: this error originates in the macro `define_panic` (in Nightly builds, run with -Z macro-backtrace for more info)
68
71
69
-
error[E0659]: `include` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
72
+
error[E0659]: `include` is ambiguous
70
73
--> $DIR/local-modularized-tricky-fail-1.rs:47:1
71
74
|
72
75
LL | include!();
73
76
| ^^^^^^^ ambiguous name
74
77
|
78
+
= note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
75
79
= note: `include` could refer to a macro from prelude
76
80
note: `include` could also refer to the macro defined here
Copy file name to clipboardExpand all lines: src/test/ui/imports/macro-paths.stderr
+4-2
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,10 @@
1
-
error[E0659]: `bar` is ambiguous (glob import vs macro-expanded name in the same module during import/macro resolution)
1
+
error[E0659]: `bar` is ambiguous
2
2
--> $DIR/macro-paths.rs:13:5
3
3
|
4
4
LL | bar::m! {
5
5
| ^^^ ambiguous name
6
6
|
7
+
= note: ambiguous because of a conflict between a name from a glob import and a macro-expanded name in the same module during import or macro resolution
7
8
note: `bar` could refer to the module defined here
8
9
--> $DIR/macro-paths.rs:14:9
9
10
|
@@ -16,12 +17,13 @@ LL | use foo::*;
16
17
| ^^^^^^
17
18
= help: consider adding an explicit import of `bar` to disambiguate
18
19
19
-
error[E0659]: `baz` is ambiguous (macro-expanded name vs less macro-expanded name from outer scope during import/macro resolution)
20
+
error[E0659]: `baz` is ambiguous
20
21
--> $DIR/macro-paths.rs:23:5
21
22
|
22
23
LL | baz::m! {
23
24
| ^^^ ambiguous name
24
25
|
26
+
= note: ambiguous because of a conflict between a macro-expanded name and a less macro-expanded name from outer scope during import or macro resolution
25
27
note: `baz` could refer to the module defined here
0 commit comments