-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Introduce Scope::NonGlobModule and Scope::GlobModule #144131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
4d3f051
5caedeb
4d7fa7c
2818f1d
cef2b26
6104053
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0659]: `HeaderMap` is ambiguous | ||
--> $DIR/import-after-macro-expand-10.rs:14:22 | ||
| | ||
LL | let h: crate::b::HeaderMap = HeaderMap; | ||
| ^^^^^^^^^ ambiguous name | ||
| | ||
= 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We are certainly not "during import or macro resolution" here. |
||
note: `HeaderMap` could refer to the struct defined here | ||
--> $DIR/import-after-macro-expand-10.rs:8:5 | ||
| | ||
LL | pub struct HeaderMap; | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
note: `HeaderMap` could also refer to the struct imported here | ||
--> $DIR/import-after-macro-expand-10.rs:6:13 | ||
| | ||
LL | pub use self::http::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0659]: `H` is ambiguous | ||
--> $DIR/import-after-macro-expand-11.rs:14:29 | ||
| | ||
LL | let h: crate::p::H = H; | ||
| ^ ambiguous name | ||
| | ||
= 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 | ||
note: `H` could refer to the struct defined here | ||
--> $DIR/import-after-macro-expand-11.rs:8:5 | ||
| | ||
LL | struct H; | ||
| ^^^^^^^^^ | ||
= help: use `self::H` to refer to this struct unambiguously | ||
note: `H` could also refer to the struct imported here | ||
--> $DIR/import-after-macro-expand-11.rs:5:9 | ||
| | ||
LL | use super::*; | ||
| ^^^^^^^^ | ||
= help: use `self::H` to refer to this struct unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0659]: `HeaderMap` is ambiguous | ||
--> $DIR/import-after-macro-expand-13.rs:20:22 | ||
| | ||
LL | let h: crate::b::HeaderMap = HeaderMap; | ||
| ^^^^^^^^^ ambiguous name | ||
| | ||
= 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 | ||
note: `HeaderMap` could refer to the struct defined here | ||
--> $DIR/import-after-macro-expand-13.rs:12:5 | ||
| | ||
LL | pub struct HeaderMap; | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
note: `HeaderMap` could also refer to the struct imported here | ||
--> $DIR/import-after-macro-expand-13.rs:10:13 | ||
| | ||
LL | pub use self::http::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0659]: `HeaderMap` is ambiguous | ||
--> $DIR/import-after-macro-expand-14.rs:19:22 | ||
| | ||
LL | let h: crate::b::HeaderMap = HeaderMap; | ||
| ^^^^^^^^^ ambiguous name | ||
| | ||
= 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 | ||
note: `HeaderMap` could refer to the struct defined here | ||
--> $DIR/import-after-macro-expand-14.rs:11:5 | ||
| | ||
LL | pub struct HeaderMap; | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
note: `HeaderMap` could also refer to the struct imported here | ||
--> $DIR/import-after-macro-expand-14.rs:9:13 | ||
| | ||
LL | pub use self::http::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
error[E0659]: `Thing` is ambiguous | ||
--> $DIR/import-after-macro-expand-2.rs:14:27 | ||
| | ||
LL | let thing: crate::Thing = Thing::Foo; | ||
| ^^^^^ ambiguous name | ||
| | ||
= 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 | ||
note: `Thing` could refer to the enum defined here | ||
--> $DIR/import-after-macro-expand-2.rs:6:1 | ||
| | ||
LL | / pub enum Thing { | ||
LL | | Foo | ||
LL | | } | ||
| |_^ | ||
= help: use `crate::Thing` to refer to this enum unambiguously | ||
note: `Thing` could also refer to the enum imported here | ||
--> $DIR/import-after-macro-expand-2.rs:3:5 | ||
| | ||
LL | use thing::*; | ||
| ^^^^^^^^ | ||
= help: use `crate::Thing` to refer to this enum unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0659]: `HeaderMap` is ambiguous | ||
--> $DIR/import-after-macro-expand-6.rs:20:22 | ||
| | ||
LL | let h: crate::b::HeaderMap = HeaderMap; | ||
| ^^^^^^^^^ ambiguous name | ||
| | ||
= 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 | ||
note: `HeaderMap` could refer to the struct defined here | ||
--> $DIR/import-after-macro-expand-6.rs:14:5 | ||
| | ||
LL | pub struct HeaderMap; | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
note: `HeaderMap` could also refer to the struct imported here | ||
--> $DIR/import-after-macro-expand-6.rs:12:13 | ||
| | ||
LL | pub use self::http::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
error[E0659]: `HeaderMap` is ambiguous | ||
--> $DIR/import-after-macro-expand-9.rs:14:22 | ||
| | ||
LL | let h: crate::b::HeaderMap = HeaderMap; | ||
| ^^^^^^^^^ ambiguous name | ||
| | ||
= 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 | ||
note: `HeaderMap` could refer to the struct defined here | ||
--> $DIR/import-after-macro-expand-9.rs:10:5 | ||
| | ||
LL | pub struct HeaderMap; | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
note: `HeaderMap` could also refer to the struct imported here | ||
--> $DIR/import-after-macro-expand-9.rs:8:13 | ||
| | ||
LL | pub use self::http::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: use `self::HeaderMap` to refer to this struct unambiguously | ||
|
||
error: aborting due to 1 previous error | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
error[E0659]: `f` is ambiguous | ||
--> $DIR/imports.rs:23:19 | ||
| | ||
LL | let _: bool = f(); | ||
| ^ ambiguous name | ||
| | ||
= note: ambiguous because of multiple glob imports of a name in the same module | ||
note: `f` could refer to the function imported here | ||
--> $DIR/imports.rs:20:9 | ||
| | ||
LL | use crate::foo::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: consider adding an explicit import of `f` to disambiguate | ||
note: `f` could also refer to the function imported here | ||
--> $DIR/imports.rs:21:9 | ||
| | ||
LL | use crate::bar::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: consider adding an explicit import of `f` to disambiguate | ||
|
||
error[E0659]: `f` is ambiguous | ||
--> $DIR/imports.rs:31:19 | ||
| | ||
LL | let _: bool = f(); | ||
| ^ ambiguous name | ||
| | ||
= note: ambiguous because of multiple glob imports of a name in the same module | ||
note: `f` could refer to the function imported here | ||
--> $DIR/imports.rs:28:9 | ||
| | ||
LL | use crate::foo::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: consider adding an explicit import of `f` to disambiguate | ||
note: `f` could also refer to the function imported here | ||
--> $DIR/imports.rs:29:9 | ||
| | ||
LL | use crate::bar::*; | ||
| ^^^^^^^^^^^^^ | ||
= help: consider adding an explicit import of `f` to disambiguate | ||
|
||
error: aborting due to 2 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0659`. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,4 +22,5 @@ mac!(); | |
fn main() { | ||
A!(); | ||
//~^ ERROR `A` is ambiguous | ||
//~^^ ERROR `A` is ambiguous | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you use more human readable annotations here and in other tests? They are not only for compiletest.