From 4e0168ec14b74003e8388b72b64c2ca78b580274 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Sat, 21 Dec 2019 15:17:10 +0100 Subject: Remove imports from hir --- crates/ra_hir_def/src/item_scope.rs | 2 +- crates/ra_hir_def/src/lib.rs | 2 +- crates/ra_hir_def/src/nameres/raw.rs | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) (limited to 'crates/ra_hir_def') diff --git a/crates/ra_hir_def/src/item_scope.rs b/crates/ra_hir_def/src/item_scope.rs index 6b9be8325..ad104bb3d 100644 --- a/crates/ra_hir_def/src/item_scope.rs +++ b/crates/ra_hir_def/src/item_scope.rs @@ -161,5 +161,5 @@ pub struct Resolution { /// None for unresolved pub def: PerNs, /// ident by which this is imported into local scope. - pub import: Option, + pub(crate) import: Option, } diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs index acd4f4af1..8cb5ab8d0 100644 --- a/crates/ra_hir_def/src/lib.rs +++ b/crates/ra_hir_def/src/lib.rs @@ -52,7 +52,7 @@ use crate::body::Expander; use crate::builtin_type::BuiltinType; #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] -pub struct LocalImportId(RawId); +pub(crate) struct LocalImportId(RawId); impl_arena_id!(LocalImportId); #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] diff --git a/crates/ra_hir_def/src/nameres/raw.rs b/crates/ra_hir_def/src/nameres/raw.rs index ecb4d7c03..df5dac88a 100644 --- a/crates/ra_hir_def/src/nameres/raw.rs +++ b/crates/ra_hir_def/src/nameres/raw.rs @@ -48,12 +48,6 @@ pub struct ImportSourceMap { type ImportSourcePtr = Either, AstPtr>; -impl ImportSourceMap { - pub fn get(&self, import: LocalImportId) -> ImportSourcePtr { - self.map[import].clone() - } -} - impl RawItems { pub(crate) fn raw_items_query( db: &(impl DefDatabase + AstDatabase), -- cgit v1.2.3