From 0e995adcf690778739fe94fb94ae317d42b4e51b Mon Sep 17 00:00:00 2001 From: Lukas Wirth Date: Sun, 28 Feb 2021 20:39:43 +0100 Subject: Turn Ty::Tuple variant into a tuple-variant --- crates/hir/src/code_model.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/hir/src') diff --git a/crates/hir/src/code_model.rs b/crates/hir/src/code_model.rs index cdb54eca2..1c31e29ac 100644 --- a/crates/hir/src/code_model.rs +++ b/crates/hir/src/code_model.rs @@ -1547,7 +1547,7 @@ impl Type { } pub fn is_unit(&self) -> bool { - matches!(self.ty.value, Ty::Tuple { cardinality: 0, .. }) + matches!(self.ty.value, Ty::Tuple(0, ..)) } pub fn is_bool(&self) -> bool { matches!(self.ty.value, Ty::Scalar(Scalar::Bool)) @@ -1741,7 +1741,7 @@ impl Type { } pub fn tuple_fields(&self, _db: &dyn HirDatabase) -> Vec { - if let Ty::Tuple { substs, .. } = &self.ty.value { + if let Ty::Tuple(_, substs) = &self.ty.value { substs.iter().map(|ty| self.derived(ty.clone())).collect() } else { Vec::new() -- cgit v1.2.3