diff options
Diffstat (limited to 'crates/syntax/src')
-rw-r--r-- | crates/syntax/src/ast/make.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index f8b508a90..5a6687397 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs | |||
@@ -275,6 +275,9 @@ pub fn expr_tuple(elements: impl IntoIterator<Item = ast::Expr>) -> ast::Expr { | |||
275 | let expr = elements.into_iter().format(", "); | 275 | let expr = elements.into_iter().format(", "); |
276 | expr_from_text(&format!("({})", expr)) | 276 | expr_from_text(&format!("({})", expr)) |
277 | } | 277 | } |
278 | pub fn expr_assignment(lhs: ast::Expr, rhs: ast::Expr) -> ast::Expr { | ||
279 | expr_from_text(&format!("{} = {}", lhs, rhs)) | ||
280 | } | ||
278 | fn expr_from_text(text: &str) -> ast::Expr { | 281 | fn expr_from_text(text: &str) -> ast::Expr { |
279 | ast_from_text(&format!("const C: () = {};", text)) | 282 | ast_from_text(&format!("const C: () = {};", text)) |
280 | } | 283 | } |