Skip to main content

type_mismatch_err

Macro type_mismatch_err 

Source
macro_rules! type_mismatch_err {
    ($expected:literal, $got:expr) => { ... };
}
Expand description

Build an error string for an unexpected VsfType variant at decode time.

With the errors-verbose feature (default-on), expands to format! of the expected-label plus a {:?} of the value. Without it, expands to a static string with just the expected label and drops the value via let _ = &v;.

Disabling errors-verbose lets the linker remove <VsfType as Debug>::fmt — which transitively removes the IEEE-754 grisu/dragon float formatters (~10 KB on cortex-m) since they’re only kept alive by the float variants’ Debug arms.