Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upStatic asserts #1146
Comments
nrc
added
the
T-lang
label
Aug 29, 2016
This comment has been minimized.
This comment has been minimized.
|
The only thing needed to get this working is rust-lang/rust#51999 so I am closing this in favor of that issue. |
Centril
closed this
Oct 7, 2018
This comment has been minimized.
This comment has been minimized.
DoumanAsh
commented
Dec 5, 2018
|
@Centril Small question because I have use case for |
This comment has been minimized.
This comment has been minimized.
|
@DoumanAsh With #2526 you can define |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nikomatsakis commentedJun 2, 2015
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:
#[static_assert]attribute.