Skip to content

Commit af32411

Browse files
committed
Avoid double-interning some BoundVariableKinds.
This function has this line twice: ``` let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars); ``` The second occurrence is effectively a no-op, because the first occurrence interned any that needed it.
1 parent 107f14d commit af32411

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

compiler/rustc_trait_selection/src/traits/select/confirmation.rs

-2
Original file line numberDiff line numberDiff line change
@@ -566,8 +566,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
566566
});
567567
let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars);
568568
let assoc_ty_substs = tcx.intern_substs(&substs);
569-
570-
let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars);
571569
let bound =
572570
bound.map_bound(|b| b.kind().skip_binder()).subst(tcx, assoc_ty_substs);
573571
tcx.mk_predicate(ty::Binder::bind_with_vars(bound, bound_vars))

0 commit comments

Comments
 (0)