You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0080]: evaluation of constant value failed
--> src/lib.rs:3:23
|
3 | const _: () = assert!($x);
| ^^^^^^^^^^^ the evaluated program panicked at 'assertion failed: 2 + 2 == 5', src/lib.rs:7:1
...
7 | const_assert!(2+2==5);
| ---------------------- in this macro invocation
|
= note: this error originates in the macro `assert` (in Nightly builds, run with -Z macro-backtrace for more info)
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: