-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix glob import tests #141060
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?
Fix glob import tests #141060
Conversation
This comment has been minimized.
This comment has been minimized.
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.
Thanks for the fix. A few nits.
mod foo { | ||
pub use d::*; // this imports d::Foo | ||
pub use m::Foo; // this should shadow d::Foo | ||
} |
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.
Suggestion: a few things:
- Move this test to
tests/ui/resolve/
, and - Rename it to sth more meaningful, like
non-glob-vs-glob-reexport-precedence
- Add a doc comment to the test to back link to the issue, e.g.
//! Regression test for #14082
.
@@ -0,0 +1,38 @@ | |||
#![allow(unused_imports, dead_code)] | |||
|
|||
mod test1 { |
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.
Suggestion: can you rename these test modules as something more semantically meaningful, e.g.
test1
->glob_vs_glob_ambiguity
test2
->non_glob_vs_non_glob_name_collision
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.
Suggestion:
- Rename this test as sth more meaningful like
import-glob-ambiguity-non-glob-collision
- Ditto on the doc comment for a backlink.
Fixes #140780 and #140765
r? jieyouxu