diff options
Diffstat (limited to 'crates/ra_hir/src/generics.rs')
-rw-r--r-- | crates/ra_hir/src/generics.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/crates/ra_hir/src/generics.rs b/crates/ra_hir/src/generics.rs index c72360f44..6ae0ead1b 100644 --- a/crates/ra_hir/src/generics.rs +++ b/crates/ra_hir/src/generics.rs | |||
@@ -7,7 +7,7 @@ use std::sync::Arc; | |||
7 | 7 | ||
8 | use ra_syntax::ast::{self, NameOwner, TypeParamsOwner}; | 8 | use ra_syntax::ast::{self, NameOwner, TypeParamsOwner}; |
9 | 9 | ||
10 | use crate::{db::PersistentHirDatabase, Name, AsName, Function, Struct, Enum, Trait, Type}; | 10 | use crate::{db::PersistentHirDatabase, Name, AsName, Function, Struct, Enum, Trait, Type, ImplBlock}; |
11 | 11 | ||
12 | /// Data about a generic parameter (to a function, struct, impl, ...). | 12 | /// Data about a generic parameter (to a function, struct, impl, ...). |
13 | #[derive(Clone, PartialEq, Eq, Debug)] | 13 | #[derive(Clone, PartialEq, Eq, Debug)] |
@@ -30,8 +30,9 @@ pub enum GenericDef { | |||
30 | Enum(Enum), | 30 | Enum(Enum), |
31 | Trait(Trait), | 31 | Trait(Trait), |
32 | Type(Type), | 32 | Type(Type), |
33 | ImplBlock(ImplBlock), | ||
33 | } | 34 | } |
34 | impl_froms!(GenericDef: Function, Struct, Enum, Trait, Type); | 35 | impl_froms!(GenericDef: Function, Struct, Enum, Trait, Type, ImplBlock); |
35 | 36 | ||
36 | impl GenericParams { | 37 | impl GenericParams { |
37 | pub(crate) fn generic_params_query( | 38 | pub(crate) fn generic_params_query( |
@@ -45,6 +46,7 @@ impl GenericParams { | |||
45 | GenericDef::Enum(it) => generics.fill(&*it.source(db).1), | 46 | GenericDef::Enum(it) => generics.fill(&*it.source(db).1), |
46 | GenericDef::Trait(it) => generics.fill(&*it.source(db).1), | 47 | GenericDef::Trait(it) => generics.fill(&*it.source(db).1), |
47 | GenericDef::Type(it) => generics.fill(&*it.source(db).1), | 48 | GenericDef::Type(it) => generics.fill(&*it.source(db).1), |
49 | GenericDef::ImplBlock(it) => generics.fill(&*it.source(db).1), | ||
48 | } | 50 | } |
49 | 51 | ||
50 | Arc::new(generics) | 52 | Arc::new(generics) |