diff options
Diffstat (limited to 'crates/ra_syntax/src/ast/make.rs')
-rw-r--r-- | crates/ra_syntax/src/ast/make.rs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index ee0f5cc40..7b17fef49 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs | |||
@@ -22,8 +22,7 @@ pub fn path_unqualified(segment: ast::PathSegment) -> ast::Path { | |||
22 | pub fn path_qualified(qual: ast::Path, segment: ast::PathSegment) -> ast::Path { | 22 | pub fn path_qualified(qual: ast::Path, segment: ast::PathSegment) -> ast::Path { |
23 | path_from_text(&format!("{}::{}", qual, segment)) | 23 | path_from_text(&format!("{}::{}", qual, segment)) |
24 | } | 24 | } |
25 | 25 | fn path_from_text(text: &str) -> ast::Path { | |
26 | pub fn path_from_text(text: &str) -> ast::Path { | ||
27 | ast_from_text(text) | 26 | ast_from_text(text) |
28 | } | 27 | } |
29 | 28 | ||
@@ -83,14 +82,6 @@ pub fn block_expr( | |||
83 | ast_from_text(&format!("fn f() {}", buf)) | 82 | ast_from_text(&format!("fn f() {}", buf)) |
84 | } | 83 | } |
85 | 84 | ||
86 | pub fn block_from_expr(e: ast::Expr) -> ast::Block { | ||
87 | return from_text(&format!("{{ {} }}", e)); | ||
88 | |||
89 | fn from_text(text: &str) -> ast::Block { | ||
90 | ast_from_text(&format!("fn f() {}", text)) | ||
91 | } | ||
92 | } | ||
93 | |||
94 | pub fn expr_unit() -> ast::Expr { | 85 | pub fn expr_unit() -> ast::Expr { |
95 | expr_from_text("()") | 86 | expr_from_text("()") |
96 | } | 87 | } |