diff --git a/cranelift/object/tests/basic.rs b/cranelift/object/tests/basic.rs index cf5eca5273..9ed9c351a2 100644 --- a/cranelift/object/tests/basic.rs +++ b/cranelift/object/tests/basic.rs @@ -199,9 +199,7 @@ fn libcall_function() { } #[test] -#[should_panic( - expected = "Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\0with\\0nul\\0bytes\" has a null byte, which is disallowed" -)] +#[should_panic(expected = "has a null byte, which is disallowed")] fn reject_nul_byte_symbol_for_func() { let flag_builder = settings::builder(); let isa_builder = cranelift_codegen::isa::lookup_by_name("x86_64-unknown-linux-gnu").unwrap(); @@ -223,9 +221,7 @@ fn reject_nul_byte_symbol_for_func() { } #[test] -#[should_panic( - expected = "Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\0with\\0nul\\0bytes\" has a null byte, which is disallowed" -)] +#[should_panic(expected = "has a null byte, which is disallowed")] fn reject_nul_byte_symbol_for_data() { let flag_builder = settings::builder(); let isa_builder = cranelift_codegen::isa::lookup_by_name("x86_64-unknown-linux-gnu").unwrap();