Skip to content

Document the type privacy restrictions #1557

Description

@mattheww

The following program is rejected (though the sub module alone would be accepted with a warning):

mod sub {
    struct Priv;
    pub fn get_value() -> Priv { todo!() }
}

fn main() {
    sub::get_value();
}

I believe the restrictions which cause this rejection aren't described at present in the Reference.

I think the best available documentation is in rfc2145.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-visibilityArea: visibility and privacy

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions