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
Code like this fails to compile, while it compiles with std panic!().
let foo:u32 = match version {4 => 123,5 => 456,
_ => defmt::panic!("unknown version {:?}", version),};
error: macro expansion ignores token `;` and any following
--> firmware/qemu/src/bin/panic.rs:14:14
|
14 | _ => defmt::panic!("unknown version {:?}", version),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: you might be missing a semicolon here: `;`
| |
| caused by the macro expansion here
|
= note: the usage of `defmt::panic!` is likely invalid in expression context
error[E0308]: mismatched types
--> firmware/qemu/src/bin/panic.rs:14:14
|
14 | _ => defmt::panic!("unknown version {:?}", version),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u32`, found `()`
|
= 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:
Code like this fails to compile, while it compiles with std
panic!()
.The text was updated successfully, but these errors were encountered: