diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-16 16:31:47 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-02-17 22:24:34 +1100 |
| commit | af32411f20d4e4f79a2c8b4b645b2693a46c3d7d (patch) | |
| tree | 44ee4d0ae848413b4dd0c18ddfc7af0db29f1ea3 | |
| parent | 107f14d2cac563608d31f08819380e4ed47e120a (diff) | |
| download | rust-af32411f20d4e4f79a2c8b4b645b2693a46c3d7d.tar.gz rust-af32411f20d4e4f79a2c8b4b645b2693a46c3d7d.zip | |
Avoid double-interning some `BoundVariableKind`s.
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.
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/confirmation.rs | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs index 60a78e642c3..e4a832e4728 100644 --- a/compiler/rustc_trait_selection/src/traits/select/confirmation.rs +++ b/compiler/rustc_trait_selection/src/traits/select/confirmation.rs @@ -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)) |
