Skip to content

Commit bf5db6a

Browse files
committed
perf?
1 parent 749eeee commit bf5db6a

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_hir_typeck/src

1 file changed

+2
-1
lines changed

compiler/rustc_hir_typeck/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,8 @@ fn typeck_with_inspect<'tcx>(
115115
return tcx.typeck(typeck_root_def_id);
116116
}
117117

118-
if let DefKind::AnonConst = tcx.def_kind(def_id)
118+
if tcx.features().min_generic_const_args()
119+
&& let DefKind::AnonConst = tcx.def_kind(def_id)
119120
&& let ty::AnonConstKind::MCG = tcx.anon_const_kind(def_id)
120121
&& let Err(e) = tcx.check_anon_const_invalid_param_uses(def_id)
121122
{

0 commit comments

Comments
 (0)