From d05b1f1e49d94c756a2512a4ddb004716c33bd88 Mon Sep 17 00:00:00 2001 From: Tethys Svensson Date: Fri, 17 Oct 2025 10:07:05 +0200 Subject: [PATCH] Fix an issue with str::from_utf8 not being available on rust 1.67 --- codespan-reporting/src/term/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codespan-reporting/src/term/mod.rs b/codespan-reporting/src/term/mod.rs index ab01954e..e2c5cc50 100644 --- a/codespan-reporting/src/term/mod.rs +++ b/codespan-reporting/src/term/mod.rs @@ -45,7 +45,7 @@ pub fn emit_to_string<'files, F: Files<'files> + ?Sized>( files, diagnostic, )?; - let buffer_str: &str = str::from_utf8(&buffer).expect("buffer not utf8"); + let buffer_str: &str = core::str::from_utf8(&buffer).expect("buffer not utf8"); writer.push_str(buffer_str); Ok(()) }