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
add function to tell if the current ambiguity error matches a previous one in ambiguity_errors
if 2 errors of the kind and ident and span of the ident, b1, b2 and misc1 misc2 are the same
then these 2 ambiguity errors matched
prevent identical ambiguity error from pushing into vector of ambiguity_errors
this will fix#105177
Copy file name to clipboardExpand all lines: src/test/ui/imports/local-modularized-tricky-fail-1.stderr
+3-28
Original file line number
Diff line number
Diff line change
@@ -23,33 +23,8 @@ LL | use inner1::*;
23
23
= help: consider adding an explicit import of `exported` to disambiguate
24
24
= note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
25
25
26
-
error[E0659]: `exported` is ambiguous
27
-
--> $DIR/local-modularized-tricky-fail-1.rs:28:1
28
-
|
29
-
LL | exported!();
30
-
| ^^^^^^^^ ambiguous name
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
33
-
note: `exported` could refer to the macro defined here
34
-
--> $DIR/local-modularized-tricky-fail-1.rs:5:5
35
-
|
36
-
LL | / macro_rules! exported {
37
-
LL | | () => ()
38
-
LL | | }
39
-
| |_____^
40
-
...
41
-
LL | define_exported!();
42
-
| ------------------ in this macro invocation
43
-
note: `exported` could also refer to the macro imported here
44
-
--> $DIR/local-modularized-tricky-fail-1.rs:22:5
45
-
|
46
-
LL | use inner1::*;
47
-
| ^^^^^^^^^
48
-
= help: consider adding an explicit import of `exported` to disambiguate
49
-
= note: this error originates in the macro `define_exported` (in Nightly builds, run with -Z macro-backtrace for more info)
50
-
51
26
error[E0659]: `panic` is ambiguous
52
-
--> $DIR/local-modularized-tricky-fail-1.rs:36:5
27
+
--> $DIR/local-modularized-tricky-fail-1.rs:35:5
53
28
|
54
29
LL | panic!();
55
30
| ^^^^^ ambiguous name
@@ -70,7 +45,7 @@ LL | define_panic!();
70
45
= note: this error originates in the macro `define_panic` (in Nightly builds, run with -Z macro-backtrace for more info)
71
46
72
47
error[E0659]: `include` is ambiguous
73
-
--> $DIR/local-modularized-tricky-fail-1.rs:47:1
48
+
--> $DIR/local-modularized-tricky-fail-1.rs:46:1
74
49
|
75
50
LL | include!();
76
51
| ^^^^^^^ ambiguous name
@@ -90,6 +65,6 @@ LL | define_include!();
90
65
= help: use `crate::include` to refer to this macro unambiguously
91
66
= note: this error originates in the macro `define_include` (in Nightly builds, run with -Z macro-backtrace for more info)
92
67
93
-
error: aborting due to 4 previous errors
68
+
error: aborting due to 3 previous errors
94
69
95
70
For more information about this error, try `rustc --explain E0659`.
Copy file name to clipboardExpand all lines: src/test/ui/imports/macros.stderr
+5-24
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ LL | m! {
6
6
|
7
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
8
8
note: `m` could refer to the macro imported here
9
-
--> $DIR/macros.rs:18:13
9
+
--> $DIR/macros.rs:17:13
10
10
|
11
11
LL | use foo::m;
12
12
| ^^^^^^
@@ -18,43 +18,24 @@ LL | use two_macros::*;
18
18
= help: consider adding an explicit import of `m` to disambiguate
19
19
20
20
error[E0659]: `m` is ambiguous
21
-
--> $DIR/macros.rs:16:5
22
-
|
23
-
LL | m! {
24
-
| ^ ambiguous name
25
-
|
26
-
= 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
27
-
note: `m` could refer to the macro imported here
28
-
--> $DIR/macros.rs:18:13
29
-
|
30
-
LL | use foo::m;
31
-
| ^^^^^^
32
-
note: `m` could also refer to the macro imported here
33
-
--> $DIR/macros.rs:15:9
34
-
|
35
-
LL | use two_macros::*;
36
-
| ^^^^^^^^^^^^^
37
-
= help: consider adding an explicit import of `m` to disambiguate
38
-
39
-
error[E0659]: `m` is ambiguous
40
-
--> $DIR/macros.rs:30:9
21
+
--> $DIR/macros.rs:29:9
41
22
|
42
23
LL | m! {
43
24
| ^ ambiguous name
44
25
|
45
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
46
27
note: `m` could refer to the macro imported here
47
-
--> $DIR/macros.rs:31:17
28
+
--> $DIR/macros.rs:30:17
48
29
|
49
30
LL | use two_macros::n as m;
50
31
| ^^^^^^^^^^^^^^^^^^
51
32
note: `m` could also refer to the macro imported here
52
-
--> $DIR/macros.rs:23:9
33
+
--> $DIR/macros.rs:22:9
53
34
|
54
35
LL | use two_macros::m;
55
36
| ^^^^^^^^^^^^^
56
37
= help: use `self::m` to refer to this macro unambiguously
57
38
58
-
error: aborting due to 3 previous errors
39
+
error: aborting due to 2 previous errors
59
40
60
41
For more information about this error, try `rustc --explain E0659`.
0 commit comments