diff options
Diffstat (limited to 'crates/ra_hir/src/code_model.rs')
-rw-r--r-- | crates/ra_hir/src/code_model.rs | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 0295eb948..4578a0ba8 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs | |||
@@ -15,9 +15,9 @@ 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, GenericParamId, | 18 | AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, FunctionId, HasModule, ImplId, |
19 | HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId, | 19 | LocalEnumVariantId, LocalImportId, LocalModuleId, LocalStructFieldId, Lookup, ModuleId, |
20 | Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId, UnionId, | 20 | StaticId, StructId, TraitId, TypeAliasId, TypeParamId, UnionId, |
21 | }; | 21 | }; |
22 | use hir_expand::{ | 22 | use hir_expand::{ |
23 | diagnostics::DiagnosticSink, | 23 | diagnostics::DiagnosticSink, |
@@ -856,14 +856,14 @@ impl Local { | |||
856 | } | 856 | } |
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 TypeParam { |
860 | pub(crate) id: GenericParamId, | 860 | pub(crate) id: TypeParamId, |
861 | } | 861 | } |
862 | 862 | ||
863 | impl GenericParam { | 863 | impl TypeParam { |
864 | pub fn name(self, db: &impl HirDatabase) -> Name { | 864 | pub fn name(self, db: &impl HirDatabase) -> Name { |
865 | let params = db.generic_params(self.id.parent); | 865 | let params = db.generic_params(self.id.parent); |
866 | params.params[self.id.local_id].name.clone() | 866 | params.types[self.id.local_id].name.clone() |
867 | } | 867 | } |
868 | 868 | ||
869 | pub fn module(self, db: &impl HirDatabase) -> Module { | 869 | pub fn module(self, db: &impl HirDatabase) -> Module { |
@@ -1111,7 +1111,7 @@ impl HirDisplay for Type { | |||
1111 | pub enum ScopeDef { | 1111 | pub enum ScopeDef { |
1112 | ModuleDef(ModuleDef), | 1112 | ModuleDef(ModuleDef), |
1113 | MacroDef(MacroDef), | 1113 | MacroDef(MacroDef), |
1114 | GenericParam(GenericParam), | 1114 | GenericParam(TypeParam), |
1115 | ImplSelfType(ImplBlock), | 1115 | ImplSelfType(ImplBlock), |
1116 | AdtSelfType(Adt), | 1116 | AdtSelfType(Adt), |
1117 | Local(Local), | 1117 | Local(Local), |