Skip to content

Commit

Permalink
Avoid double-interning some BoundVariableKinds.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nnethercote committed Feb 17, 2023
1 parent 107f14d commit af32411
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit af32411

Please sign in to comment.