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 #107880 - jieyouxu:issue-107563, r=petrochenkov
Lint ambiguous glob re-exports
Attempts to fix#107563.
We currently already emit errors for ambiguous re-exports when two names are re-exported *specifically*, i.e. not from glob exports. This PR attempts to emit deny-by-default lints for ambiguous glob re-exports.
Copy file name to clipboardexpand all lines: tests/ui/imports/local-modularized-tricky-fail-1.stderr
+7-7
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,12 @@
1
1
error[E0659]: `exported` is ambiguous
2
-
--> $DIR/local-modularized-tricky-fail-1.rs:28:1
2
+
--> $DIR/local-modularized-tricky-fail-1.rs:29:1
3
3
|
4
4
LL | exported!();
5
5
| ^^^^^^^^ ambiguous name
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: `exported` could refer to the macro defined here
9
-
--> $DIR/local-modularized-tricky-fail-1.rs:5:5
9
+
--> $DIR/local-modularized-tricky-fail-1.rs:6:5
10
10
|
11
11
LL | / macro_rules! exported {
12
12
LL | | () => ()
@@ -16,23 +16,23 @@ LL | | }
16
16
LL | define_exported!();
17
17
| ------------------ in this macro invocation
18
18
note: `exported` could also refer to the macro imported here
19
-
--> $DIR/local-modularized-tricky-fail-1.rs:22:5
19
+
--> $DIR/local-modularized-tricky-fail-1.rs:23:5
20
20
|
21
21
LL | use inner1::*;
22
22
| ^^^^^^^^^
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
26
error[E0659]: `panic` is ambiguous
27
-
--> $DIR/local-modularized-tricky-fail-1.rs:35:5
27
+
--> $DIR/local-modularized-tricky-fail-1.rs:36:5
28
28
|
29
29
LL | panic!();
30
30
| ^^^^^ ambiguous name
31
31
|
32
32
= 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
33
33
= note: `panic` could refer to a macro from prelude
34
34
note: `panic` could also refer to the macro defined here
35
-
--> $DIR/local-modularized-tricky-fail-1.rs:11:5
35
+
--> $DIR/local-modularized-tricky-fail-1.rs:12:5
36
36
|
37
37
LL | / macro_rules! panic {
38
38
LL | | () => ()
@@ -45,15 +45,15 @@ LL | define_panic!();
45
45
= note: this error originates in the macro `define_panic` (in Nightly builds, run with -Z macro-backtrace for more info)
46
46
47
47
error[E0659]: `include` is ambiguous
48
-
--> $DIR/local-modularized-tricky-fail-1.rs:46:1
48
+
--> $DIR/local-modularized-tricky-fail-1.rs:47:1
49
49
|
50
50
LL | include!();
51
51
| ^^^^^^^ ambiguous name
52
52
|
53
53
= 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
54
54
= note: `include` could refer to a macro from prelude
55
55
note: `include` could also refer to the macro defined here
0 commit comments