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
One small nit though: when the static assertion fails, the build error is very cryptic. It's not immediately obvious what has happened.
constMY_ERRNO:u32 = 40000;static_assert!((-(MY_ERRNOasi128)) fits in i16);
error: any use of this value will cause an error
--> rust/kernel/static_assert.rs:129:23
|
129 | const _: () = [()][!($condition) as usize];
| --------------^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
| |
| index out of bounds: the length is 1 but the index is 1
|
::: rust/kernel/error.rs:113:1
|
113 | static_assert!((-(MY_ERRNO as i128)) fits in i16);
| -------------------------------------------------- in this macro invocation
|
= note: `#[deny(const_err)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
The text was updated successfully, but these errors were encountered:
From #269 (comment):
The text was updated successfully, but these errors were encountered: