Skip to content

extern crate foo with use self::foo doesn't work inside a function #27626

@durka

Description

@durka

EDIT (@steveklabnik) see #27626 (comment)

This code fails and rustc doesn't tell you why:

fn main() {
    extern crate rand;
    use self::rand::Rng;
}

(playpen)

I think it should at least warn, assuming there is some reason why it can't do what it looks like it does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-diagnosticsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions