Skip to content

Private type in exported type signature when it shouldn't #23585

Closed
@tomaka

Description

@tomaka

This code:

mod A {
    struct X;

    mod B {
        use A::X;
        pub fn foo(_: X) {}
    }
}

Triggers:

src\main.rs:6:23: 6:24 error: private type in exported type signature
src\main.rs:6         pub fn foo(_: X) {}

The foo function is only visible to A and B, and X is also visible to both A and B, so I don't see why this would be forbidden.

This was introduced in the rustc 1.0.0-nightly (f4e0ce66a 2015-03-19) (built 2015-03-20) nightly. With the 2015-03-17, this works.

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