mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-22 18:15:07 +03:00
Fix ui test for updated core::panic behaviour.
It now throws a &str instead of a String.
This commit is contained in:
@@ -53,8 +53,8 @@ enum LR_NonZero {
|
||||
fn test_panic_msg<T>(op: impl (FnOnce() -> T) + panic::UnwindSafe, msg: &str) {
|
||||
let err = panic::catch_unwind(op).err();
|
||||
assert_eq!(
|
||||
err.as_ref().and_then(|a| a.downcast_ref::<String>()).map(|s| &**s),
|
||||
Some(msg)
|
||||
err.as_ref().and_then(|a| a.downcast_ref::<&str>()),
|
||||
Some(&msg)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user