Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --<!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --: <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<p</p</details<!-- TRIAGEBOTSTART --<!-- TRIAGEBOTASSIGNSTART --<!-- TRIAGEBOTASSIGNDATASTARTTRIAGEBOTASSIGNDATAEND --<!-- TRIAGEBOTASSIGNEND --<!-- TRIAGEBOTEND --
Regression in cc
Thanks :) claim

Discussion:
// Types with identity (print the module path). ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), substs) | ty::FnDef(def_id, substs) <del> | ty::Alias(_, ty::AliasTy { def_id, substs, .. }) </del> <ins> | ty::Alias(ty::Projection | ty::Opaque, ty::AliasTy { def_id, substs, .. }) </ins> | ty::Closure(def_id, substs) | ty::Generator(def_id, substs, _) => self.print_def_path(def_id, substs), ty::Foreign(def_id) => self.print_def_path(def_id, &[]), <ins> ty::Alias(ty::Inherent, _) => bug!("type_name: unexpected inherent projection"), </ins> ty::GeneratorWitness(_) => bug!("type_name: unexpected `GeneratorWitness`"), ty::GeneratorWitnessMIR(..) => bug!("type_name: unexpected `GeneratorWitnessMIR`"), }

traits.entry(trait_ref).or_default().extend(proj_ty); } <ins> fn pretty_print_inherent_projection( self, alias_ty: &ty::AliasTy<'tcx>, ) -> Result<Self::Path, Self::Error> { let def_key = self.tcx().def_key(alias_ty.def_id); self.path_generic_args( |cx| { cx.path_append( |cx| cx.path_qualified(alias_ty.self_ty(), None), &def_key.disambiguated_data, ) }, &alias_ty.substs[1..], ) } </ins> fn ty_infer_name(&self, _: ty::TyVid) -> Option<Symbol> { None }

} ty::AliasTy<'tcx> { <del> p!(print_def_path(self.def_id, self.substs)); </del> <ins> if let DefKind::Impl { of_trait: false } = cx.tcx().def_kind(cx.tcx().parent(self.def_id)) { p!(pretty_print_inherent_projection(self)) } else { p!(print_def_path(self.def_id, self.substs)); } </ins> } ty::ClosureKind {

match *ty.kind() { // Print all nominal types as paths (unlike `pretty_print_type`). ty::FnDef(def_id, substs) <del> | ty::Alias(_, ty::AliasTy { def_id, substs, .. }) </del> <ins> | ty::Alias(ty::Projection | ty::Opaque, ty::AliasTy { def_id, substs, .. }) </ins> | ty::Closure(def_id, substs) | ty::Generator(def_id, substs, _) => self.print_def_path(def_id, substs),

Ok(self) } <ins> ty::Alias(ty::Inherent, _) => panic!("unexpected inherent projection"), </ins> _ => self.pretty_print_type(ty), } }

// Mangle all nominal types as paths. ty::Adt(ty::AdtDef(Interned(&ty::AdtDefData { did: def_id, .. }, _)), substs) | ty::FnDef(def_id, substs) <del> | ty::Alias(_, ty::AliasTy { def_id, substs, .. }) </del> <ins> | ty::Alias(ty::Projection | ty::Opaque, ty::AliasTy { def_id, substs, .. }) </ins> | ty::Closure(def_id, substs) | ty::Generator(def_id, substs, _) => { self = self.print_def_path(def_id, substs)?;

self = r.print(self)?; } <ins> ty::Alias(ty::Inherent, _) => bug!("symbol_names: unexpected inherent projection"), </ins> ty::GeneratorWitness(_) => bug!("symbol_names: unexpected `GeneratorWitness`"), ty::GeneratorWitnessMIR(..) => bug!("symbol_names: unexpected `GeneratorWitnessMIR`"), }