aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_ty/src/infer/pat.rs
diff options
context:
space:
mode:
authorLukas Wirth <[email protected]>2021-02-28 19:39:43 +0000
committerLukas Wirth <[email protected]>2021-02-28 19:39:43 +0000
commit0e995adcf690778739fe94fb94ae317d42b4e51b (patch)
tree5f15802e2bac7e1752d3c3d493ea39bc97ccaec9 /crates/hir_ty/src/infer/pat.rs
parent2fc137b70f9d455676cc99a1a5c7e6e10c3e7cc2 (diff)
Turn Ty::Tuple variant into a tuple-variant
Diffstat (limited to 'crates/hir_ty/src/infer/pat.rs')
-rw-r--r--crates/hir_ty/src/infer/pat.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/infer/pat.rs b/crates/hir_ty/src/infer/pat.rs
index e96e08c3c..a318e47f3 100644
--- a/crates/hir_ty/src/infer/pat.rs
+++ b/crates/hir_ty/src/infer/pat.rs
@@ -138,7 +138,7 @@ impl<'a> InferenceContext<'a> {
138 inner_tys.extend(expectations_iter.by_ref().take(n_uncovered_patterns).cloned()); 138 inner_tys.extend(expectations_iter.by_ref().take(n_uncovered_patterns).cloned());
139 inner_tys.extend(post.iter().zip(expectations_iter).map(infer_pat)); 139 inner_tys.extend(post.iter().zip(expectations_iter).map(infer_pat));
140 140
141 Ty::Tuple { cardinality: inner_tys.len() as u16, substs: Substs(inner_tys.into()) } 141 Ty::Tuple(inner_tys.len(), Substs(inner_tys.into()))
142 } 142 }
143 Pat::Or(ref pats) => { 143 Pat::Or(ref pats) => {
144 if let Some((first_pat, rest)) = pats.split_first() { 144 if let Some((first_pat, rest)) = pats.split_first() {