Fix CI for Rust 1.61.0 (#4164)

A new version of rustc was released this morning and we have a few small
breakages on our CI which need fixing:

* A new warning was coming out of the c-api crate about an unneeded
  `unsafe` block.
* The panic message of a task in `cranelift-object` needed updating
  since the standard library changed how it formats strings with the nul
  byte.
This commit is contained in:
Alex Crichton
2022-05-19 10:44:45 -05:00
committed by GitHub
parent 411f3d60f3
commit 0a0c232a14
2 changed files with 3 additions and 3 deletions

View File

@@ -200,7 +200,7 @@ fn libcall_function() {
#[test]
#[should_panic(
expected = "Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed"
expected = "Result::unwrap()` on an `Err` value: Backend(Symbol \"function\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"
)]
fn reject_nul_byte_symbol_for_func() {
let flag_builder = settings::builder();
@@ -224,7 +224,7 @@ fn reject_nul_byte_symbol_for_func() {
#[test]
#[should_panic(
expected = "Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\u{0}with\\u{0}nul\\u{0}bytes\" has a null byte, which is disallowed"
expected = "Result::unwrap()` on an `Err` value: Backend(Symbol \"data\\0with\\0nul\\0bytes\" has a null byte, which is disallowed"
)]
fn reject_nul_byte_symbol_for_data() {
let flag_builder = settings::builder();