diff options
Diffstat (limited to 'crates/ra_assists/src/ast_transform.rs')
-rw-r--r-- | crates/ra_assists/src/ast_transform.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs index a74ac42d5..0e53c1eee 100644 --- a/crates/ra_assists/src/ast_transform.rs +++ b/crates/ra_assists/src/ast_transform.rs | |||
@@ -40,9 +40,9 @@ impl<'a> SubstituteTypeParams<'a> { | |||
40 | db: &'a RootDatabase, | 40 | db: &'a RootDatabase, |
41 | // FIXME: there's implicit invariant that `trait_` and `source_scope` match... | 41 | // FIXME: there's implicit invariant that `trait_` and `source_scope` match... |
42 | trait_: hir::Trait, | 42 | trait_: hir::Trait, |
43 | impl_block: ast::ImplBlock, | 43 | impl_def: ast::ImplDef, |
44 | ) -> SubstituteTypeParams<'a> { | 44 | ) -> SubstituteTypeParams<'a> { |
45 | let substs = get_syntactic_substs(impl_block).unwrap_or_default(); | 45 | let substs = get_syntactic_substs(impl_def).unwrap_or_default(); |
46 | let generic_def: hir::GenericDef = trait_.into(); | 46 | let generic_def: hir::GenericDef = trait_.into(); |
47 | let substs_by_param: FxHashMap<_, _> = generic_def | 47 | let substs_by_param: FxHashMap<_, _> = generic_def |
48 | .params(db) | 48 | .params(db) |
@@ -59,8 +59,8 @@ impl<'a> SubstituteTypeParams<'a> { | |||
59 | 59 | ||
60 | // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the | 60 | // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the |
61 | // trait ref, and then go from the types in the substs back to the syntax) | 61 | // trait ref, and then go from the types in the substs back to the syntax) |
62 | fn get_syntactic_substs(impl_block: ast::ImplBlock) -> Option<Vec<ast::TypeRef>> { | 62 | fn get_syntactic_substs(impl_def: ast::ImplDef) -> Option<Vec<ast::TypeRef>> { |
63 | let target_trait = impl_block.target_trait()?; | 63 | let target_trait = impl_def.target_trait()?; |
64 | let path_type = match target_trait { | 64 | let path_type = match target_trait { |
65 | ast::TypeRef::PathType(path) => path, | 65 | ast::TypeRef::PathType(path) => path, |
66 | _ => return None, | 66 | _ => return None, |