diff options
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/ty/generics.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_middle/src/ty/generics.rs b/compiler/rustc_middle/src/ty/generics.rs index 19779740227..ce40ab18261 100644 --- a/compiler/rustc_middle/src/ty/generics.rs +++ b/compiler/rustc_middle/src/ty/generics.rs @@ -86,10 +86,10 @@ impl GenericParamDef { tcx: TyCtxt<'tcx>, ) -> Option<EarlyBinder<'tcx, ty::GenericArg<'tcx>>> { match self.kind { - GenericParamDefKind::Type { has_default, .. } if has_default => { + GenericParamDefKind::Type { has_default: true, .. } => { Some(tcx.type_of(self.def_id).map_bound(|t| t.into())) } - GenericParamDefKind::Const { has_default, .. } if has_default => { + GenericParamDefKind::Const { has_default: true, .. } => { Some(tcx.const_param_default(self.def_id).map_bound(|c| c.into())) } _ => None, |
