From ee95a35664e6fe9153f6324cfc57872ca365887c Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Wed, 20 Nov 2019 17:49:57 +0300 Subject: Don't duplicate ContainerId type --- crates/ra_hir_def/src/traits.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/ra_hir_def/src/traits.rs') 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}; use rustc_hash::FxHashMap; use crate::{ - db::DefDatabase2, AssocItemId, AstItemDef, ConstId, FunctionContainerId, FunctionLoc, Intern, - LocationCtx, ModuleDefId, ModuleId, TraitId, TypeAliasContainerId, TypeAliasLoc, + db::DefDatabase2, AssocItemId, AstItemDef, ConstId, ContainerId, FunctionLoc, Intern, + LocationCtx, ModuleDefId, ModuleId, TraitId, TypeAliasLoc, }; #[derive(Debug, Clone, PartialEq, Eq)] @@ -35,14 +35,14 @@ impl TraitData { .impl_items() .map(|item_node| match item_node { ast::ImplItem::FnDef(it) => FunctionLoc { - container: FunctionContainerId::TraitId(tr), + container: ContainerId::TraitId(tr), ast_id: AstId::new(src.file_id, ast_id_map.ast_id(&it)), } .intern(db) .into(), ast::ImplItem::ConstDef(it) => ConstId::from_ast(ctx, &it).into(), ast::ImplItem::TypeAliasDef(it) => TypeAliasLoc { - container: TypeAliasContainerId::TraitId(tr), + container: ContainerId::TraitId(tr), ast_id: AstId::new(src.file_id, ast_id_map.ast_id(&it)), } .intern(db) -- cgit v1.2.3