-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Feature Request static asserts #2790
Copy link
Copy link
Closed
Labels
A-assertionsProposals relating to assertions.Proposals relating to assertions.A-const-evalProposals relating to compile time evaluation (CTFE).Proposals relating to compile time evaluation (CTFE).T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Metadata
Metadata
Assignees
Labels
A-assertionsProposals relating to assertions.Proposals relating to assertions.A-const-evalProposals relating to compile time evaluation (CTFE).Proposals relating to compile time evaluation (CTFE).T-libs-apiRelevant to the library API team, which will review and decide on the RFC.Relevant to the library API team, which will review and decide on the RFC.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I think asserts are a pretty common thing, especially in unsafe rust (checking sizes/alignments etc.)
Now with anonymous consts we can already do things like:
I propose to add macros like this to the core library, with the whole
assert/assert_eq/assert_nefacade.I think these would be really useful