Skip to content

Static asserts #1146

Closed
Closed
@nikomatsakis

Description

@nikomatsakis

It would be useful to be able to specify static expressions which must be evaluated to true or else compilation will fail. This can be particularly useful in checking assumptions that are baked into unsafe code, such as that the size of two structs is equal.

Relevant RFCs:

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