From 00f3b6c59ae3df9a7bfb1cd8b694d5f9b6a78be4 Mon Sep 17 00:00:00 2001 From: Fedor Sakharov Date: Wed, 13 May 2020 16:06:42 +0300 Subject: Correctly fill default type parameters --- crates/ra_syntax/src/ast/make.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'crates/ra_syntax') 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 { ast_from_text(&format!("fn f() {{ {}; }}", text)) } +pub fn type_arg(text: &str) -> ast::TypeArg { + ast_from_text(&format!("impl F<{}> for G {{}}", text)) +} + pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment { ast_from_text(&format!("use {};", name_ref)) } -- cgit v1.2.3