aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-05-08 21:20:09 +0100
committerGitHub <[email protected]>2021-05-08 21:20:09 +0100
commit304cdd7778eaaaf02d0d4ed632000d86f181caa2 (patch)
treeb6fc312163e09bd3eef55b9adaf48cb1ccffbe26 /crates/syntax
parent96c5df9b171730ad69e130e074584684cee35014 (diff)
parent1ee12b5db17f6f4396af6bfd6ba2528de7f86c78 (diff)
Merge #8770
8770: feat: add "mentoring instructions" test for pull up assist r=matklad a=matklad bors r+ 🤖 Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/syntax')
-rw-r--r--crates/syntax/src/ast/make.rs3
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}
278pub fn expr_assignment(lhs: ast::Expr, rhs: ast::Expr) -> ast::Expr {
279 expr_from_text(&format!("{} = {}", lhs, rhs))
280}
278fn expr_from_text(text: &str) -> ast::Expr { 281fn 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}