diff options
| author | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-15 22:58:40 -0400 |
|---|---|---|
| committer | Mark Rousskov <mark.simulacrum@gmail.com> | 2021-09-15 22:58:40 -0400 |
| commit | 905beab38ead75dcc283c641ebdaf84450e6e3c2 (patch) | |
| tree | 63b679c780825e321957fe54dfabff5baa096bde /compiler/rustc_trait_selection/src/traits | |
| parent | 4aed1abb706a31331fd8b612ca400935aeddd0e0 (diff) | |
Reuse existing shared Lrc for MatchImpl parent
This is hopefully a small performance win for the hot path.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits')
| -rw-r--r-- | compiler/rustc_trait_selection/src/traits/select/mod.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/select/mod.rs b/compiler/rustc_trait_selection/src/traits/select/mod.rs index 7b948a0939f..2a9be427480 100644 --- a/compiler/rustc_trait_selection/src/traits/select/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/select/mod.rs @@ -2025,7 +2025,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> { let cause = ObligationCause::new( obligation.cause.span, obligation.cause.body_id, - ObligationCauseCode::MatchImpl(Lrc::new(obligation.cause.code.clone()), impl_def_id), + ObligationCauseCode::MatchImpl(obligation.cause.clone(), impl_def_id), ); let InferOk { obligations, .. } = self |
