aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/ast/make.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/ast/make.rs')
-rw-r--r--crates/ra_syntax/src/ast/make.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index 3d4fed64c..673777015 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -148,18 +148,18 @@ pub fn condition(expr: ast::Expr, pattern: Option<ast::Pat>) -> ast::Condition {
148 } 148 }
149} 149}
150 150
151pub fn bind_pat(name: ast::Name) -> ast::BindPat { 151pub fn bind_pat(name: ast::Name) -> ast::IdentPat {
152 return from_text(name.text()); 152 return from_text(name.text());
153 153
154 fn from_text(text: &str) -> ast::BindPat { 154 fn from_text(text: &str) -> ast::IdentPat {
155 ast_from_text(&format!("fn f({}: ())", text)) 155 ast_from_text(&format!("fn f({}: ())", text))
156 } 156 }
157} 157}
158 158
159pub fn placeholder_pat() -> ast::PlaceholderPat { 159pub fn placeholder_pat() -> ast::WildcardPat {
160 return from_text("_"); 160 return from_text("_");
161 161
162 fn from_text(text: &str) -> ast::PlaceholderPat { 162 fn from_text(text: &str) -> ast::WildcardPat {
163 ast_from_text(&format!("fn f({}: ())", text)) 163 ast_from_text(&format!("fn f({}: ())", text))
164 } 164 }
165} 165}