From d6023948275b3cef0b8320864595d24ad959c0e3 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 21 Feb 2024 14:51:59 +1100 Subject: Change message type in bug functions. From `impl Into` to `impl Into>`. Because these functions don't produce user-facing output and we don't want their strings to be translated. --- src/tools/rust-analyzer/crates/hir-ty/src/layout.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/tools/rust-analyzer') diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs index be1c8d9094b..a1be6018083 100644 --- a/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs +++ b/src/tools/rust-analyzer/crates/hir-ty/src/layout.rs @@ -1,5 +1,6 @@ //! Compute the binary representation of a type +use std::borrow::Cow; use std::fmt; use base_db::salsa::Cycle; @@ -114,8 +115,8 @@ struct LayoutCx<'a> { impl<'a> LayoutCalculator for LayoutCx<'a> { type TargetDataLayoutRef = &'a TargetDataLayout; - fn delayed_bug(&self, txt: String) { - never!("{}", txt); + fn delayed_bug(&self, txt: impl Into>) { + never!("{}", txt.into()); } fn current_data_layout(&self) -> &'a TargetDataLayout { -- cgit 1.4.1-3-g733a5