1
Fork 0

Auto merge of #120980 - matthiaskrgr:rollup-dsjsqql, r=matthiaskrgr

Rollup of 11 pull requests

Successful merges:

 - #120765 (Reorder diagnostics API)
 - #120833 (More internal emit diagnostics cleanups)
 - #120899 (Gracefully handle non-WF alias in `assemble_alias_bound_candidates_recur`)
 - #120917 (Remove a bunch of dead parameters in functions)
 - #120928 (Add test for recently fixed issue)
 - #120933 (check_consts: fix duplicate errors, make importance consistent)
 - #120936 (improve `btree_cursors` functions documentation)
 - #120944 (Check that the ABI of the instance we are inlining is correct)
 - #120956 (Clean inlined type alias with correct param-env)
 - #120962 (Add myself to library/std review)
 - #120972 (fix ICE for deref coercions with type errors)

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2024-02-12 17:06:22 +00:00
commit b381d3ab27
62 changed files with 805 additions and 790 deletions

View file

@ -15,7 +15,7 @@ use rustc_middle::ty::fast_reject::{SimplifiedType, TreatParams};
use rustc_middle::ty::{self, Ty, TyCtxt};
use rustc_middle::ty::{fast_reject, TypeFoldable};
use rustc_middle::ty::{ToPredicate, TypeVisitableExt};
use rustc_span::ErrorGuaranteed;
use rustc_span::{ErrorGuaranteed, DUMMY_SP};
use std::fmt::Debug;
pub(super) mod structural_traits;
@ -612,7 +612,11 @@ impl<'tcx> EvalCtxt<'_, 'tcx> {
ty::Alias(kind @ (ty::Projection | ty::Opaque), alias_ty) => (kind, alias_ty),
ty::Alias(ty::Inherent | ty::Weak, _) => {
unreachable!("Weak and Inherent aliases should have been normalized away already")
self.tcx().sess.dcx().span_delayed_bug(
DUMMY_SP,
format!("could not normalize {self_ty}, it is not WF"),
);
return;
}
};

View file

@ -615,8 +615,6 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
let UnsatisfiedConst(unsatisfied_const) = self
.maybe_add_note_for_unsatisfied_const(
&obligation,
trait_ref,
&trait_predicate,
&mut err,
span,
@ -1480,8 +1478,6 @@ pub(super) trait InferCtxtPrivExt<'tcx> {
fn maybe_add_note_for_unsatisfied_const(
&self,
obligation: &PredicateObligation<'tcx>,
trait_ref: ty::PolyTraitRef<'tcx>,
trait_predicate: &ty::PolyTraitPredicate<'tcx>,
err: &mut Diagnostic,
span: Span,
@ -3359,8 +3355,6 @@ impl<'tcx> InferCtxtPrivExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
fn maybe_add_note_for_unsatisfied_const(
&self,
_obligation: &PredicateObligation<'tcx>,
_trait_ref: ty::PolyTraitRef<'tcx>,
_trait_predicate: &ty::PolyTraitPredicate<'tcx>,
_err: &mut Diagnostic,
_span: Span,