diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-07 20:55:29 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-07 20:55:29 +0000 |
commit | 9e551d5452232d1d44e4bba754392beaa3a7628f (patch) | |
tree | 3ce4073c5a0b98732242d3eb5668e746d8aef785 /crates/ra_hir/src | |
parent | 971df306ada43f6150e12a143873f680e104a866 (diff) | |
parent | 6e2e60cbc9226dd3f43cf2b83ff6f5a0cf39e639 (diff) |
Merge #2495
2495: Discover type parameters in more cases r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r-- | crates/ra_hir/src/from_source.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_hir/src/from_source.rs b/crates/ra_hir/src/from_source.rs index 68e59fc1e..4acc038e4 100644 --- a/crates/ra_hir/src/from_source.rs +++ b/crates/ra_hir/src/from_source.rs | |||
@@ -184,6 +184,11 @@ impl TypeParam { | |||
184 | let res = match_ast! { | 184 | let res = match_ast! { |
185 | match it { | 185 | match it { |
186 | ast::FnDef(value) => { Function::from_source(db, InFile { value, file_id})?.id.into() }, | 186 | ast::FnDef(value) => { Function::from_source(db, InFile { value, file_id})?.id.into() }, |
187 | ast::StructDef(value) => { Struct::from_source(db, InFile { value, file_id})?.id.into() }, | ||
188 | ast::EnumDef(value) => { Enum::from_source(db, InFile { value, file_id})?.id.into() }, | ||
189 | ast::TraitDef(value) => { Trait::from_source(db, InFile { value, file_id})?.id.into() }, | ||
190 | ast::TypeAliasDef(value) => { TypeAlias::from_source(db, InFile { value, file_id})?.id.into() }, | ||
191 | ast::ImplBlock(value) => { ImplBlock::from_source(db, InFile { value, file_id})?.id.into() }, | ||
187 | _ => return None, | 192 | _ => return None, |
188 | } | 193 | } |
189 | }; | 194 | }; |