Macro assert_matches2::assert_matches
source · macro_rules! assert_matches { ($e:expr, $pat:pat) => { ... }; ($e:expr, $pat:pat, $($arg:tt)*) => { ... }; }
Expand description
Assert that the given expression matches the given pattern, and introduce any bindings from the pattern into the surrounding scope.
If the assertion fails, the expression before the comma is debug-printed as part of the panic message.