Skip to content

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

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion tests/ui/issues/issue-14082.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use foo::Foo;

mod foo {
pub use d::*; // this imports d::Foo
pub use m::Foo; // this should shadow d::Foo
}
Comment on lines 7 to 10
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: a few things:

  1. Move this test to tests/ui/resolve/, and
  2. Rename it to sth more meaningful, like non-glob-vs-glob-reexport-precedence
  3. Add a doc comment to the test to back link to the issue, e.g. //! Regression test for #14082.


Expand All @@ -16,4 +17,6 @@ mod d {
pub struct Foo;
}

fn main() {}
fn main() {
let _: foo::Foo = m::Foo;
}