Skip to content

Commit 7e9396c

Browse files
committed
Change type_arg to type_ref func
1 parent a55ad20 commit 7e9396c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

crates/ra_assists/src/ast_transform.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,11 @@ impl<'a> SubstituteTypeParams<'a> {
6464
let default = k.default(source_scope.db)?;
6565
Some((
6666
k,
67-
ast::make::type_arg(
67+
ast::make::type_ref(
6868
&default
6969
.display_source_code(source_scope.db, source_scope.module()?.into())
7070
.ok()?,
7171
)
72-
.type_ref()?,
7372
))
7473
}
7574
})

crates/ra_syntax/src/ast/make.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ pub fn name_ref(text: &str) -> ast::NameRef {
1313
ast_from_text(&format!("fn f() {{ {}; }}", text))
1414
}
1515

16-
pub fn type_arg(text: &str) -> ast::TypeArg {
17-
ast_from_text(&format!("impl F<{}> for G {{}}", text))
16+
pub fn type_ref(text: &str) -> ast::TypeRef {
17+
ast_from_text(&format!("impl {} for D {{}};", text))
1818
}
1919

2020
pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {

0 commit comments

Comments
 (0)