aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-06-22 14:47:34 +0100
committerAleksey Kladov <[email protected]>2021-06-22 14:53:53 +0100
commit9526c198f6b38438f2eae37b23a7426dff5e4341 (patch)
tree4adc9ddc9e94fa2430c4ef98594a15e578eb5147
parent5ede497778e1d819b95cfb63255b88936bc25206 (diff)
intenral: dont export impl details
-rw-r--r--crates/hir/src/lib.rs8
-rw-r--r--crates/hir/src/semantics/source_to_def.rs4
2 files changed, 5 insertions, 7 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 30cc34403..9c56fe1a6 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -51,7 +51,7 @@ use hir_def::{
51 LocalEnumVariantId, LocalFieldId, Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId, 51 LocalEnumVariantId, LocalFieldId, Lookup, ModuleId, StaticId, StructId, TraitId, TypeAliasId,
52 TypeParamId, UnionId, 52 TypeParamId, UnionId,
53}; 53};
54use hir_expand::{name::name, MacroCallKind, MacroDefKind}; 54use hir_expand::{name::name, MacroCallKind, MacroDefId, MacroDefKind};
55use hir_ty::{ 55use hir_ty::{
56 autoderef, 56 autoderef,
57 consteval::ConstExt, 57 consteval::ConstExt,
@@ -106,10 +106,9 @@ pub use {
106 hir_def::{ 106 hir_def::{
107 adt::StructKind, 107 adt::StructKind,
108 attr::{Attr, Attrs, AttrsWithOwner, Documentation}, 108 attr::{Attr, Attrs, AttrsWithOwner, Documentation},
109 body::scope::ExprScopes,
110 find_path::PrefixKind, 109 find_path::PrefixKind,
111 import_map, 110 import_map,
112 item_scope::ItemInNs, 111 item_scope::ItemInNs, // FIXME: don't re-export ItemInNs, as it uses raw ids.
113 nameres::ModuleSource, 112 nameres::ModuleSource,
114 path::{ModPath, PathKind}, 113 path::{ModPath, PathKind},
115 type_ref::{Mutability, TypeRef}, 114 type_ref::{Mutability, TypeRef},
@@ -117,8 +116,7 @@ pub use {
117 }, 116 },
118 hir_expand::{ 117 hir_expand::{
119 name::{known, Name}, 118 name::{known, Name},
120 ExpandResult, HirFileId, InFile, MacroCallId, MacroCallLoc, /* FIXME */ MacroDefId, 119 ExpandResult, HirFileId, InFile, MacroFile, Origin,
121 MacroFile, Origin,
122 }, 120 },
123 hir_ty::display::HirDisplay, 121 hir_ty::display::HirDisplay,
124}; 122};
diff --git a/crates/hir/src/semantics/source_to_def.rs b/crates/hir/src/semantics/source_to_def.rs
index 0c5ba3a8f..12e5d65fa 100644
--- a/crates/hir/src/semantics/source_to_def.rs
+++ b/crates/hir/src/semantics/source_to_def.rs
@@ -95,7 +95,7 @@ use hir_def::{
95 ImplId, LifetimeParamId, ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId, 95 ImplId, LifetimeParamId, ModuleId, StaticId, StructId, TraitId, TypeAliasId, TypeParamId,
96 UnionId, VariantId, 96 UnionId, VariantId,
97}; 97};
98use hir_expand::{name::AsName, AstId, MacroCallId, MacroDefKind}; 98use hir_expand::{name::AsName, AstId, MacroCallId, MacroDefId, MacroDefKind};
99use rustc_hash::FxHashMap; 99use rustc_hash::FxHashMap;
100use smallvec::SmallVec; 100use smallvec::SmallVec;
101use stdx::impl_from; 101use stdx::impl_from;
@@ -104,7 +104,7 @@ use syntax::{
104 match_ast, AstNode, SyntaxNode, 104 match_ast, AstNode, SyntaxNode,
105}; 105};
106 106
107use crate::{db::HirDatabase, InFile, MacroDefId}; 107use crate::{db::HirDatabase, InFile};
108 108
109pub(super) type SourceToDefCache = FxHashMap<ChildContainer, DynMap>; 109pub(super) type SourceToDefCache = FxHashMap<ChildContainer, DynMap>;
110 110