aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs')
-rw-r--r--crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs b/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs
index a47082617..1f4219b42 100644
--- a/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs
+++ b/crates/hir_ty/src/diagnostics/match_check/deconstruct_pat.rs
@@ -864,7 +864,8 @@ impl Fields {
864 pat: PatId, 864 pat: PatId,
865 cx: &MatchCheckCtx<'_>, 865 cx: &MatchCheckCtx<'_>,
866 ) -> Self { 866 ) -> Self {
867 // FIXME(iDawer): these alocations and clones are so unfortunate (+1 for switching to references) 867 // FIXME(iDawer): Factor out pattern deep cloning. See discussion:
868 // https://github.com/rust-analyzer/rust-analyzer/pull/8717#discussion_r633086640
868 let mut arena = cx.pattern_arena.borrow_mut(); 869 let mut arena = cx.pattern_arena.borrow_mut();
869 match arena[pat].kind.as_ref() { 870 match arena[pat].kind.as_ref() {
870 PatKind::Deref { subpattern } => { 871 PatKind::Deref { subpattern } => {