Skip to content

Privacy doesn't consider type/value namespaces. #4110

Closed
@brson

Description

The privacy passes don't consider the type/value namespaces that resolve has, so you can use a private thing in a module so long as there's a public thing with the same name in a different namespace.

Original bug report

Static method on non-pub impl makes pub type private

use foo::Bar does not resolve unless the static method is removed or the impl Bar is marked pub.

pub mod foo {
    pub enum Bar {
        Baz
    }

    impl Bar {
        static fn where() { }
    }
}

fn main() {
    use foo::Bar;
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions