diff options
author | Aleksey Kladov <[email protected]> | 2019-12-07 10:50:36 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-12-07 12:05:56 +0000 |
commit | 8e9837df21942ca12a5aece0a868ea46eb405742 (patch) | |
tree | 664cfafc63c0895d76df5c85f6f10c0739f82275 /crates/ra_hir/src/code_model.rs | |
parent | 30fefcc08cc0c670ce541476491238d258ca55c1 (diff) |
Remove idx and parent generics from generics
This makes `hir_def::GenericParams` flatter. The logic for
re-numbering the params is moved to hir instead.
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 7706399ae..29ace8479 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -15,7 +15,7 @@ use hir_def::{ | |||
15 | per_ns::PerNs, | 15 | per_ns::PerNs, |
16 | resolver::HasResolver, | 16 | resolver::HasResolver, |
17 | type_ref::{Mutability, TypeRef}, | 17 | type_ref::{Mutability, TypeRef}, |
18 | AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, FunctionId, GenericDefId, | 18 | AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, FunctionId, GenericParamId, |
19 | HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId, | 19 | HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId, |
20 | Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId, UnionId, | 20 | Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId, UnionId, |
21 | }; | 21 | }; |
@@ -857,8 +857,7 @@ impl Local { | |||
857 | 857 | ||
858 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] | 858 | #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)] |
859 | pub struct GenericParam { | 859 | pub struct GenericParam { |
860 | pub(crate) parent: GenericDefId, | 860 | pub(crate) id: GenericParamId, |
861 | pub(crate) idx: u32, | ||
862 | } | 861 | } |
863 | 862 | ||
864 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] | 863 | #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] |