Skip to content

better visibility control #3505

Closed
Closed
@jesse99

Description

@jesse99

It's very annoying that the only options for controlling visibility are public (to everyone) and private (to a module). C# has a nifty third option internal: (to an assembly).

If rust is moving towards using pub and priv to control visibility perhaps something like a crate keyword can be added so library authors have the freedom to structure their code as they like without being forced to make visible items which are properly of internal use.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)A-linkageArea: linking into static, shared libraries and binariesC-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions