Skip to content

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

Open
@pvdrz

Description

@pvdrz

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 :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyA-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions