diff options
author | Fedor Sakharov <[email protected]> | 2020-05-13 14:06:42 +0100 |
---|---|---|
committer | Fedor Sakharov <[email protected]> | 2020-05-13 14:07:44 +0100 |
commit | 00f3b6c59ae3df9a7bfb1cd8b694d5f9b6a78be4 (patch) | |
tree | 847a60e19f55dd8da4e819bd1a76b23588fb9f76 /crates/ra_syntax/src/ast | |
parent | 88d3959c33c3b8729cecbe062cff8474516df29f (diff) |
Correctly fill default type parameters
Diffstat (limited to 'crates/ra_syntax/src/ast')
-rw-r--r-- | crates/ra_syntax/src/ast/make.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs index 12c5228f5..8981cbe33 100644 --- a/crates/ra_syntax/src/ast/make.rs +++ b/crates/ra_syntax/src/ast/make.rs | |||
@@ -13,6 +13,10 @@ pub fn name_ref(text: &str) -> ast::NameRef { | |||
13 | ast_from_text(&format!("fn f() {{ {}; }}", text)) | 13 | ast_from_text(&format!("fn f() {{ {}; }}", text)) |
14 | } | 14 | } |
15 | 15 | ||
16 | pub fn type_arg(text: &str) -> ast::TypeArg { | ||
17 | ast_from_text(&format!("impl F<{}> for G {{}}", text)) | ||
18 | } | ||
19 | |||
16 | pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { | 20 | pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { |
17 | ast_from_text(&format!("use {};", name_ref)) | 21 | ast_from_text(&format!("use {};", name_ref)) |
18 | } | 22 | } |