Unnamed repository; edit this file 'description' to name the repository.
Auto merge of #122111 - matthiaskrgr:rollup-qq4v6gs, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #113518 (bootstrap/libtest: print test name eagerly on failure even with `verbose-tests=false` / `--quiet`) - #117199 (Change the documented implicit value of `-C instrument-coverage` to `=yes`) - #121190 (avoid overlapping privacy suggestion for single nested imports) - #121382 (Rework `untranslatable_diagnostic` lint) - #121959 (Removing absolute path in proc-macro) - #122038 (Fix linting paths with qself in `unused_qualifications`) - #122051 (cleanup: remove zero-offset GEP) r? `@ghost` `@rustbot` modify labels: rollup
bors 2024-03-07
parent adae314 · parent d81e911 · commit 314450f
-rw-r--r--crates/hir-ty/src/layout.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/hir-ty/src/layout.rs b/crates/hir-ty/src/layout.rs
index be1c8d9094..a1be601808 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<Cow<'static, str>>) {
+ never!("{}", txt.into());
}
fn current_data_layout(&self) -> &'a TargetDataLayout {