internal: make::expr_tuple should return ast::TupleExpr

This commit is contained in:
Giga Bowser 2024-12-16 14:27:31 -05:00
parent c549be9ab6
commit f388482119
6 changed files with 9 additions and 8 deletions

View file

@ -656,7 +656,7 @@ pub fn expr_field(receiver: ast::Expr, field: &str) -> ast::Expr {
pub fn expr_paren(expr: ast::Expr) -> ast::Expr {
expr_from_text(&format!("({expr})"))
}
pub fn expr_tuple(elements: impl IntoIterator<Item = ast::Expr>) -> ast::Expr {
pub fn expr_tuple(elements: impl IntoIterator<Item = ast::Expr>) -> ast::TupleExpr {
let expr = elements.into_iter().format(", ");
expr_from_text(&format!("({expr})"))
}