aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax/src/ast/make.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-08-12 17:49:43 +0100
committerAleksey Kladov <[email protected]>2020-08-12 17:59:13 +0100
commit0635458a6bf883b5abcae024afb17a11688fef92 (patch)
treee754396302c88aa602bb77be30ce1835c205f730 /crates/syntax/src/ast/make.rs
parentd583f2c46d22cf8d643ebf98be9cb7059a304431 (diff)
**Merge Imports** assist handles self
Diffstat (limited to 'crates/syntax/src/ast/make.rs')
-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 254a37fe3..3009faed7 100644
--- a/crates/syntax/src/ast/make.rs
+++ b/crates/syntax/src/ast/make.rs
@@ -24,6 +24,9 @@ pub fn ty(text: &str) -> ast::Type {
24pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { 24pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {
25 ast_from_text(&format!("use {};", name_ref)) 25 ast_from_text(&format!("use {};", name_ref))
26} 26}
27pub fn path_segment_self() -> ast::PathSegment {
28 ast_from_text("use self;")
29}
27pub fn path_unqualified(segment: ast::PathSegment) -> ast::Path { 30pub fn path_unqualified(segment: ast::PathSegment) -> ast::Path {
28 path_from_text(&format!("use {}", segment)) 31 path_from_text(&format!("use {}", segment))
29} 32}