diff options
author | Aleksey Kladov <[email protected]> | 2019-11-20 14:49:57 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-11-20 14:50:02 +0000 |
commit | ee95a35664e6fe9153f6324cfc57872ca365887c (patch) | |
tree | 3f13501f0e73fee374a0df05fb55614311559f15 /crates/ra_hir_def/src/traits.rs | |
parent | 64c21ed19594b323e72605ba8c5dd4c6eee433f6 (diff) |
Don't duplicate ContainerId type
Diffstat (limited to 'crates/ra_hir_def/src/traits.rs')
-rw-r--r-- | crates/ra_hir_def/src/traits.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_hir_def/src/traits.rs b/crates/ra_hir_def/src/traits.rs index 228524a57..bb61e852a 100644 --- a/crates/ra_hir_def/src/traits.rs +++ b/crates/ra_hir_def/src/traits.rs | |||
@@ -11,8 +11,8 @@ use ra_syntax::ast::{self, NameOwner}; | |||
11 | use rustc_hash::FxHashMap; | 11 | use rustc_hash::FxHashMap; |
12 | 12 | ||
13 | use crate::{ | 13 | use crate::{ |
14 | db::DefDatabase2, AssocItemId, AstItemDef, ConstId, FunctionContainerId, FunctionLoc, Intern, | 14 | db::DefDatabase2, AssocItemId, AstItemDef, ConstId, ContainerId, FunctionLoc, Intern, |
15 | LocationCtx, ModuleDefId, ModuleId, TraitId, TypeAliasContainerId, TypeAliasLoc, | 15 | LocationCtx, ModuleDefId, ModuleId, TraitId, TypeAliasLoc, |
16 | }; | 16 | }; |
17 | 17 | ||
18 | #[derive(Debug, Clone, PartialEq, Eq)] | 18 | #[derive(Debug, Clone, PartialEq, Eq)] |
@@ -35,14 +35,14 @@ impl TraitData { | |||
35 | .impl_items() | 35 | .impl_items() |
36 | .map(|item_node| match item_node { | 36 | .map(|item_node| match item_node { |
37 | ast::ImplItem::FnDef(it) => FunctionLoc { | 37 | ast::ImplItem::FnDef(it) => FunctionLoc { |
38 | container: FunctionContainerId::TraitId(tr), | 38 | container: ContainerId::TraitId(tr), |
39 | ast_id: AstId::new(src.file_id, ast_id_map.ast_id(&it)), | 39 | ast_id: AstId::new(src.file_id, ast_id_map.ast_id(&it)), |
40 | } | 40 | } |
41 | .intern(db) | 41 | .intern(db) |
42 | .into(), | 42 | .into(), |
43 | ast::ImplItem::ConstDef(it) => ConstId::from_ast(ctx, &it).into(), | 43 | ast::ImplItem::ConstDef(it) => ConstId::from_ast(ctx, &it).into(), |
44 | ast::ImplItem::TypeAliasDef(it) => TypeAliasLoc { | 44 | ast::ImplItem::TypeAliasDef(it) => TypeAliasLoc { |
45 | container: TypeAliasContainerId::TraitId(tr), | 45 | container: ContainerId::TraitId(tr), |
46 | ast_id: AstId::new(src.file_id, ast_id_map.ast_id(&it)), | 46 | ast_id: AstId::new(src.file_id, ast_id_map.ast_id(&it)), |
47 | } | 47 | } |
48 | .intern(db) | 48 | .intern(db) |