From 49c0b33862096367a97550221e966f3d911197ee Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 21 Feb 2024 14:51:59 +1100 Subject: [PATCH] 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. --- crates/hir-ty/src/layout.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/hir-ty/src/layout.rs b/crates/hir-ty/src/layout.rs index be1c8d9094b..a1be6018083 100644 --- a/crates/hir-ty/src/layout.rs +++ b/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 {