Skip to content

resolve: Privacy rules for re-exports can be too restrictive #31783

Closed
@jseyfried

Description

@jseyfried
mod foo {
    mod bar { pub fn f() {} }
    pub fn bar() {}
}

// This should re-export bar in the value namespace; now, it complains that the module `bar` is private.
pub use foo::bar; 

// This re-exports bar in the value namespace as expected.
pub use foo::*;

fn main() { bar::f() }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions