Skip to content

import foo::* sometimes fails to import foo::foo #1873

Closed
@marijnh

Description

@marijnh

The file below fails with unresolved name: foo (in the main fn). When moving the import and main out of the extra module, the problem goes away. It also does not happen if fn foo has a name different from its enclosing module.

mod foo {
    fn foo() {}
}
mod blah {
    import foo::*;
    fn main() { foo(); }
}

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions