This commit is contained in:
Pranav Gaddamadugu 2023-10-10 08:56:20 -04:00 committed by Pranav Gaddamadugu
parent 5b2e73d419
commit d3209dae9c
2 changed files with 2 additions and 2 deletions

View File

@ -47,7 +47,7 @@ impl<'a> CheckUniqueNodeIds<'a> {
self.check_ty(&mapping.value);
}
Type::Tuple(tuple) => {
for ty in &tuple.0 {
for ty in tuple.elements() {
self.check_ty(ty);
}
}

View File

@ -102,7 +102,7 @@ impl ParserContext<'_> {
1 => Err(ParserError::tuple_must_have_at_least_two_elements("type", span).into()),
// Otherwise, parse it into a `Tuple` type.
// Note: This is the only place where `Tuple` type is constructed in the parser.
_ => Ok((Type::Tuple(TupleType(types.into_iter().map(|t| t.0).collect())), span)),
_ => Ok((Type::Tuple(TupleType::new(types.into_iter().map(|t| t.0).collect())), span)),
}
} else {
self.parse_primitive_type()