You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improvements to the #[should_panic] feature
Add more error checking for the `#[should_panic]` attribute, and print the expected panic string when it does not match.
Fixes#29000
Eg:
```running 3 tests
test test2 ... ok
test test1 ... FAILED
: Panic did not include expected string 'foo'
test test3 ... FAILED
failures:
---- test1 stdout ----
thread 'test1' panicked at 'bar', test.rs:7
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- test3 stdout ----
thread 'test3' panicked at 'bar', test.rs:18
```
This test compiles with no warnings and passes.
I would expect at least a warning that "exepcted" was unused.
The text was updated successfully, but these errors were encountered: