Macro assert_err
Source macro_rules! assert_err {
($expr:expr $(,)?) => { ... };
}
Expand description
Panic if the expression is not Err(_).
§Examples
assert_err!(Err::<u32, &str>("failed"));
ⓘassert_err!(Ok::<u32, &str>(2025));
ⓘassert_err!(Ok::<u32, &str>Some(42));