With the current implementation in #151 the #[should_panic] macro can only be applied once, annotating a function with multiple #[should_panic] invocations will lead to a compilation error. We could potentially support invoking this multiple times with different expected messages, and then succeeding if any of the expected messages are contained within the error message. Another option is to follow libtest, which simply ignores subsequent calls to #[should_panic].
With the current implementation in #151 the
#[should_panic]macro can only be applied once, annotating a function with multiple#[should_panic]invocations will lead to a compilation error. We could potentially support invoking this multiple times with different expected messages, and then succeeding if any of the expected messages are contained within the error message. Another option is to followlibtest, which simply ignores subsequent calls to#[should_panic].