-
-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider using const_panic
in the future.
#43
Comments
It's stabilized today. |
Not only is it stable in the nightly channel, you can define a macro_rules! const_assert {
($x:expr $(,)?) => {
const _: () = assert!($x);
};
}
|
FWIW, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Tracking issue for
const_panic
: rust-lang/rust#51999.Once this gets stabilized, it would be allowed to panic in a const context, so macros like
const_assert
could be implemented like this:The text was updated successfully, but these errors were encountered: