diff options
Diffstat (limited to 'compiler/rustc_middle/src/ty/generics.rs')
-rw-r--r-- | compiler/rustc_middle/src/ty/generics.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs index 801ca6004..baef4ffed 100644 --- a/compiler/rustc_middle/src/ty/generics.rs +++ b/compiler/rustc_middle/src/ty/generics.rs @@ -85,7 +85,7 @@ impl GenericParamDef { ) -> Option<EarlyBinder<ty::GenericArg<'tcx>>> { match self.kind { GenericParamDefKind::Type { has_default, .. } if has_default => { - Some(tcx.bound_type_of(self.def_id).map_bound(|t| t.into())) + Some(tcx.type_of(self.def_id).map_bound(|t| t.into())) } GenericParamDefKind::Const { has_default } if has_default => { Some(tcx.const_param_default(self.def_id).map_bound(|c| c.into())) @@ -100,10 +100,10 @@ impl GenericParamDef { preceding_substs: &[ty::GenericArg<'tcx>], ) -> ty::GenericArg<'tcx> { match &self.kind { - ty::GenericParamDefKind::Lifetime => tcx.lifetimes.re_static.into(), - ty::GenericParamDefKind::Type { .. } => tcx.ty_error().into(), + ty::GenericParamDefKind::Lifetime => tcx.mk_re_error_misc().into(), + ty::GenericParamDefKind::Type { .. } => tcx.ty_error_misc().into(), ty::GenericParamDefKind::Const { .. } => { - tcx.const_error(tcx.bound_type_of(self.def_id).subst(tcx, preceding_substs)).into() + tcx.const_error(tcx.type_of(self.def_id).subst(tcx, preceding_substs)).into() } } } |