aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists/src/ast_transform.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-02-29 20:24:40 +0000
committerAleksey Kladov <[email protected]>2020-02-29 20:33:15 +0000
commita1e18695548b5cd6661f26a985b34c8b105e1896 (patch)
treee099bb9e9c04392dcb7fed54200a989f663f3659 /crates/ra_assists/src/ast_transform.rs
parentf316e074d2a2906a130d3046b5c3aa24daffb766 (diff)
Rename ast::ImplBlock -> ast::ImplDef
Diffstat (limited to 'crates/ra_assists/src/ast_transform.rs')
-rw-r--r--crates/ra_assists/src/ast_transform.rs8
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,