aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r--crates/ra_syntax/src/ast/make.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 979819d4b..95062ef6c 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -110,14 +110,15 @@ pub fn match_arm_list(arms: impl Iterator<Item = ast::MatchArm>) -> ast::MatchAr
110 } 110 }
111} 111}
112 112
113pub fn let_match_early(expr: ast::Expr, early_expression: &str) -> ast::LetStmt { 113pub fn let_match_early(expr: ast::Expr, path: &str, early_expression: &str) -> ast::LetStmt {
114 return from_text(&format!( 114 return from_text(&format!(
115 r#"let {} = match {} {{ 115 r#"let {} = match {} {{
116 Some(it) => it, 116 {}(it) => it,
117 None => {}, 117 None => {},
118}};"#, 118}};"#,
119 expr.syntax().text(), 119 expr.syntax().text(),
120 expr.syntax().text(), 120 expr.syntax().text(),
121 path,
121 early_expression 122 early_expression
122 )); 123 ));
123 124