From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_middle/src/ty/print/mod.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'compiler/rustc_middle/src/ty/print/mod.rs') diff --git a/compiler/rustc_middle/src/ty/print/mod.rs b/compiler/rustc_middle/src/ty/print/mod.rs index 667298b9b..c302c4611 100644 --- a/compiler/rustc_middle/src/ty/print/mod.rs +++ b/compiler/rustc_middle/src/ty/print/mod.rs @@ -116,7 +116,7 @@ pub trait Printer<'tcx>: Sized { DefPathData::Impl => { let generics = self.tcx().generics_of(def_id); let self_ty = self.tcx().bound_type_of(def_id); - let impl_trait_ref = self.tcx().bound_impl_trait_ref(def_id); + let impl_trait_ref = self.tcx().impl_trait_ref(def_id); let (self_ty, impl_trait_ref) = if substs.len() >= generics.count() { ( self_ty.subst(self.tcx(), substs), @@ -169,10 +169,8 @@ pub trait Printer<'tcx>: Sized { self.path_append( |cx: Self| { if trait_qualify_parent { - let trait_ref = ty::TraitRef::new( - parent_def_id, - cx.tcx().intern_substs(parent_substs), - ); + let trait_ref = + cx.tcx().mk_trait_ref(parent_def_id, parent_substs.iter().copied()); cx.path_qualified(trait_ref.self_ty(), Some(trait_ref)) } else { cx.print_def_path(parent_def_id, parent_substs) @@ -275,10 +273,9 @@ fn characteristic_def_id_of_type_cached<'a>( | ty::Uint(_) | ty::Str | ty::FnPtr(_) - | ty::Projection(_) + | ty::Alias(..) | ty::Placeholder(..) | ty::Param(_) - | ty::Opaque(..) | ty::Infer(_) | ty::Bound(..) | ty::Error(_) -- cgit v1.2.3