Skip to content

glob imports ignore private items #23157

Closed
@nrc

Description

@nrc

This is a bug if the importing module should be able to see the private items. E.g.,

struct Foo;

mod sub {
    import super::*;

    type Bar = Foo; // Error: use of undeclared type name Foo
}

I think there is a backwards compatibility hazard here, because if there is already an item called Foo in sub then we currently get no error, but we ought to get a name clash (unless we allow shadowing in this case).

triage: I-nominated

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specificallyE-hardCall for participation: Hard difficulty. Experience needed to fix: A lot.P-mediumMedium priorityT-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