diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 3f44a50c4..534f1f8e9 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -11,9 +11,9 @@ use hir_def::{ | |||
11 | per_ns::PerNs, | 11 | per_ns::PerNs, |
12 | resolver::{HasResolver, TypeNs}, | 12 | resolver::{HasResolver, TypeNs}, |
13 | type_ref::TypeRef, | 13 | type_ref::TypeRef, |
14 | AstItemDef, ConstId, ContainerId, EnumId, FunctionId, HasModule, ImplId, LocalEnumVariantId, | 14 | AstItemDef, ConstId, ContainerId, EnumId, FunctionId, GenericDefId, HasModule, ImplId, |
15 | LocalImportId, LocalModuleId, LocalStructFieldId, Lookup, ModuleId, StaticId, StructId, | 15 | LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId, Lookup, ModuleId, |
16 | TraitId, TypeAliasId, UnionId, | 16 | StaticId, StructId, TraitId, TypeAliasId, UnionId, |
17 | }; | 17 | }; |
18 | use hir_expand::{ | 18 | use hir_expand::{ |
19 | diagnostics::DiagnosticSink, | 19 | diagnostics::DiagnosticSink, |
@@ -897,16 +897,6 @@ impl_froms!( | |||
897 | Const | 897 | Const |
898 | ); | 898 | ); |
899 | 899 | ||
900 | impl From<AssocItem> for GenericDef { | ||
901 | fn from(item: AssocItem) -> Self { | ||
902 | match item { | ||
903 | AssocItem::Function(f) => f.into(), | ||
904 | AssocItem::Const(c) => c.into(), | ||
905 | AssocItem::TypeAlias(t) => t.into(), | ||
906 | } | ||
907 | } | ||
908 | } | ||
909 | |||
910 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 900 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
911 | pub struct Local { | 901 | pub struct Local { |
912 | pub(crate) parent: DefWithBody, | 902 | pub(crate) parent: DefWithBody, |
@@ -960,7 +950,7 @@ impl Local { | |||
960 | 950 | ||
961 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 951 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
962 | pub struct GenericParam { | 952 | pub struct GenericParam { |
963 | pub(crate) parent: GenericDef, | 953 | pub(crate) parent: GenericDefId, |
964 | pub(crate) idx: u32, | 954 | pub(crate) idx: u32, |
965 | } | 955 | } |
966 | 956 | ||