Skip to content

Test for #14082 doesn't test what it should #140765

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

Open
pvdrz opened this issue May 7, 2025 · 0 comments
Open

Test for #14082 doesn't test what it should #140765

pvdrz opened this issue May 7, 2025 · 0 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.

Comments

@pvdrz
Copy link
Contributor

pvdrz commented May 7, 2025

Please, take this with a grain of salt as I might have misunderstood what #14082 is about.

The test added for this should check that a glob import is correctly shadowed by a non-glob import of a reexport from inside a non-pub module. Essentially:

// tests/ui/issues/issue-14082.rs
//@ check-pass

#![allow(unused_imports, dead_code)]

use foo::Foo;

mod foo {
    pub use d::*;   // This imports `d::Foo`.
    pub use m::Foo; // But this imports `m::Foo` explicitly, which shadows `d::Foo`.
}

mod m {
    pub struct Foo;
}

mod d {
    pub struct Foo;
}

fn main() {}

However this was changed on this bulk refactor which removed the d::* import.

Let me know if my understanding is correct. I'll submit a PR with a fix if that's the case.

Thanks :)

@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label May 7, 2025
@lolbinarycat lolbinarycat added the A-testsuite Area: The testsuite used to check the correctness of rustc label May 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc needs-triage This issue may need triage. Remove it if it has been sufficiently triaged.
Projects
None yet
Development

No branches or pull requests

3 participants