Skip to content

Importing private reexports does not work #32303

Closed
@emberian

Description

@emberian

Testcase:

#![crate_type = "lib"]

use std::vec::Vec as Vec;

mod foo {
    use Vec;
}

This should seemingly go through with no issue, but instead:

rustc output:

foo.rs:6:9: 6:12 error: unresolved import `Vec`. There is no `Vec` in `???`. Did you mean to use `Vec`? [E0432]
foo.rs:6     use Vec;
                 ^~~
foo.rs:6:9: 6:12 help: run `rustc --explain E0432` to see a detailed explanation
error: aborting due to previous error

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name/path resolution done by `rustc_resolve` specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions