diff options
| author | bors <bors@rust-lang.org> | 2024-03-06 21:39:53 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-06 21:39:53 +0000 |
| commit | 7d3702e472b99be0f5de6608dd87af1df8f99428 (patch) | |
| tree | 131039d0f11cfd64574b2b339ed0808fed3b0773 /compiler/rustc_middle/src | |
| parent | bfe762e0ed2e95041cc12c02c5565c4368f2cc9f (diff) | |
| parent | 1a85eb0187b0e9519c3f3dcf108d51608e066aaf (diff) | |
| download | rust-7d3702e472b99be0f5de6608dd87af1df8f99428.tar.gz rust-7d3702e472b99be0f5de6608dd87af1df8f99428.zip | |
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
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/layout.rs | 3 | ||||
| -rw-r--r-- | compiler/rustc_middle/src/ty/sty.rs | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/ty/layout.rs b/compiler/rustc_middle/src/ty/layout.rs index dda41f70f06..b1bfd2f1105 100644 --- a/compiler/rustc_middle/src/ty/layout.rs +++ b/compiler/rustc_middle/src/ty/layout.rs @@ -17,6 +17,7 @@ use rustc_target::abi::call::FnAbi; use rustc_target::abi::*; use rustc_target::spec::{abi::Abi as SpecAbi, HasTargetSpec, PanicStrategy, Target}; +use std::borrow::Cow; use std::cmp; use std::fmt; use std::num::NonZero; @@ -268,7 +269,7 @@ pub struct LayoutCx<'tcx, C> { impl<'tcx> LayoutCalculator for LayoutCx<'tcx, TyCtxt<'tcx>> { type TargetDataLayoutRef = &'tcx TargetDataLayout; - fn delayed_bug(&self, txt: String) { + fn delayed_bug(&self, txt: impl Into<Cow<'static, str>>) { self.tcx.dcx().delayed_bug(txt); } diff --git a/compiler/rustc_middle/src/ty/sty.rs b/compiler/rustc_middle/src/ty/sty.rs index a0baaa3ce28..427c0f04bd1 100644 --- a/compiler/rustc_middle/src/ty/sty.rs +++ b/compiler/rustc_middle/src/ty/sty.rs @@ -13,7 +13,7 @@ use crate::ty::{GenericArg, GenericArgs, GenericArgsRef}; use crate::ty::{List, ParamEnv}; use hir::def::DefKind; use rustc_data_structures::captures::Captures; -use rustc_errors::{DiagArgValue, DiagMessage, ErrorGuaranteed, IntoDiagnosticArg, MultiSpan}; +use rustc_errors::{DiagArgValue, ErrorGuaranteed, IntoDiagnosticArg, MultiSpan}; use rustc_hir as hir; use rustc_hir::def_id::DefId; use rustc_hir::LangItem; @@ -1543,7 +1543,7 @@ impl<'tcx> Ty<'tcx> { pub fn new_error_with_message<S: Into<MultiSpan>>( tcx: TyCtxt<'tcx>, span: S, - msg: impl Into<DiagMessage>, + msg: impl Into<Cow<'static, str>>, ) -> Ty<'tcx> { let reported = tcx.dcx().span_delayed_bug(span, msg); Ty::new(tcx, Error(reported)) |
