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.
This commit is contained in:
Nicholas Nethercote 2023-02-16 16:31:47 +11:00
parent 107f14d2ca
commit af32411f20

View File

@ -566,8 +566,6 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
});
let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars);
let assoc_ty_substs = tcx.intern_substs(&substs);
let bound_vars = tcx.intern_bound_variable_kinds(&bound_vars);
let bound =
bound.map_bound(|b| b.kind().skip_binder()).subst(tcx, assoc_ty_substs);
tcx.mk_predicate(ty::Binder::bind_with_vars(bound, bound_vars))