Skip to content

transparent attribute #1744

Closed
Closed
@nrc

Description

@nrc

#[transparent] on functions and types, basically means never presented to the user (modulo a flag to turn this off). E.g., would be on the unwrap implementation methods so that that a stack trace doesn't display the noise of the panic and unwrap implementation as the top of the stack trace.

Use on types is to avoid telling the user about things like UnsafeCell which are usually just noise in error messages for users, they should be transparent wrappers.

Used by std libs in Swift.

cc @gankro

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions