Skip to content

use can't resolve non-pub parent module through super #5248

Closed

Description

This use statement doesn't resolve:

mod foo {
    pub fn bar() { }
}

mod baz {
    use super::foo;
    fn main() {
        foo::bar();
    }
}

This one does:

mod foo {
    pub fn bar() { }
}

mod baz {
    use super::foo::bar;
    fn main() {
        bar();
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    A-resolveArea: Name resolution

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions