[][src]Macro unwrap_all::expect_all

expect_all!() { /* proc-macro */ }

Running this function will give you a panic with the message 1 - must fail: 23, where the 1 tells you how many levels in the panic was caused.

use unwrap_all::expect_all;

fn must_fail() {
    let var = Some(Err::<usize, isize>(23));
    let _result: usize = expect_all!(2, "must fail", var);
}