Skip to content

Cannot glob import the crate root. #31484

Closed
@retep998

Description

@retep998

The following does not compile.

mod foo {
    use *;
    pub fn meow(){bar()}
}
pub fn bar(){}
fn main(){foo::meow()}

Also tried use ::*; use {*}; and use ::{*};.

I'm not sure why we don't support this case. Maybe nobody felt anyone would ever use it? It sure would be nice to have in winapi.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions