diff options
author | Aleksey Kladov <[email protected]> | 2020-07-30 17:28:28 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2020-07-30 17:28:28 +0100 |
commit | c5798c4d75aa807aec47208a49101bdec3affcca (patch) | |
tree | 1af0efdcee857e1ba91e76f4cc7fd7c043916ebb /crates/ra_assists/src/ast_transform.rs | |
parent | c83467796b6c7365ea4f41900d74444384a9e618 (diff) |
Finalize impl Grammar
Diffstat (limited to 'crates/ra_assists/src/ast_transform.rs')
-rw-r--r-- | crates/ra_assists/src/ast_transform.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs index 01adb834c..5ea4f9f5b 100644 --- a/crates/ra_assists/src/ast_transform.rs +++ b/crates/ra_assists/src/ast_transform.rs | |||
@@ -41,7 +41,7 @@ impl<'a> SubstituteTypeParams<'a> { | |||
41 | source_scope: &'a SemanticsScope<'a>, | 41 | source_scope: &'a SemanticsScope<'a>, |
42 | // FIXME: there's implicit invariant that `trait_` and `source_scope` match... | 42 | // FIXME: there's implicit invariant that `trait_` and `source_scope` match... |
43 | trait_: hir::Trait, | 43 | trait_: hir::Trait, |
44 | impl_def: ast::ImplDef, | 44 | impl_def: ast::Impl, |
45 | ) -> SubstituteTypeParams<'a> { | 45 | ) -> SubstituteTypeParams<'a> { |
46 | let substs = get_syntactic_substs(impl_def).unwrap_or_default(); | 46 | let substs = get_syntactic_substs(impl_def).unwrap_or_default(); |
47 | let generic_def: hir::GenericDef = trait_.into(); | 47 | let generic_def: hir::GenericDef = trait_.into(); |
@@ -80,7 +80,7 @@ impl<'a> SubstituteTypeParams<'a> { | |||
80 | 80 | ||
81 | // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the | 81 | // FIXME: It would probably be nicer if we could get this via HIR (i.e. get the |
82 | // trait ref, and then go from the types in the substs back to the syntax) | 82 | // trait ref, and then go from the types in the substs back to the syntax) |
83 | fn get_syntactic_substs(impl_def: ast::ImplDef) -> Option<Vec<ast::TypeRef>> { | 83 | fn get_syntactic_substs(impl_def: ast::Impl) -> Option<Vec<ast::TypeRef>> { |
84 | let target_trait = impl_def.target_trait()?; | 84 | let target_trait = impl_def.target_trait()?; |
85 | let path_type = match target_trait { | 85 | let path_type = match target_trait { |
86 | ast::TypeRef::PathType(path) => path, | 86 | ast::TypeRef::PathType(path) => path, |