Skip to content

Commit 16d3a7b

Browse files
bors[bot]Jonas Schievink
andauthored
Merge #11266
11266: internal: Mostly restore `hir` API boundary r=jonas-schievink a=jonas-schievink The boundary was broken in #10872 by reexporting a bunch of `hir_def`-internal types. This PR moves symbol collection to `hir` and removes those reexports again. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
2 parents 4fe10b7 + 09219e1 commit 16d3a7b

File tree

7 files changed

+401
-400
lines changed

7 files changed

+401
-400
lines changed

crates/hir/src/lib.rs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ mod has_source;
2828

2929
pub mod diagnostics;
3030
pub mod db;
31+
pub mod symbols;
3132

3233
mod display;
3334

@@ -40,12 +41,16 @@ use hir_def::{
4041
adt::{ReprKind, VariantData},
4142
body::{BodyDiagnostic, SyntheticSyntax},
4243
expr::{BindingAnnotation, LabelId, Pat, PatId},
44+
item_tree::ItemTreeNode,
4345
lang_item::LangItemTarget,
4446
nameres::{self, diagnostics::DefDiagnostic},
4547
per_ns::PerNs,
4648
resolver::{HasResolver, Resolver},
47-
AttrDefId, ConstId, ConstParamId, EnumId, FunctionId, GenericDefId, HasModule, LifetimeParamId,
48-
LocalEnumVariantId, LocalFieldId, StaticId, StructId, TypeAliasId, TypeParamId, UnionId,
49+
src::HasSource as _,
50+
AdtId, AssocItemId, AssocItemLoc, AttrDefId, ConstId, ConstParamId, DefWithBodyId, EnumId,
51+
FunctionId, GenericDefId, HasModule, ImplId, ItemContainerId, LifetimeParamId,
52+
LocalEnumVariantId, LocalFieldId, Lookup, StaticId, StructId, TraitId, TypeAliasId,
53+
TypeParamId, UnionId,
4954
};
5055
use hir_expand::{name::name, MacroCallKind, MacroDefKind};
5156
use hir_ty::{
@@ -106,24 +111,11 @@ pub use {
106111
builtin_attr::AttributeTemplate,
107112
find_path::PrefixKind,
108113
import_map,
109-
item_scope::ItemScope,
110-
item_tree::ItemTreeNode,
111-
nameres::{DefMap, ModuleData, ModuleOrigin, ModuleSource},
114+
nameres::ModuleSource,
112115
path::{ModPath, PathKind},
113-
src::HasSource as DefHasSource, // xx: I don't like this shadowing of HasSource... :(
114116
type_ref::{Mutability, TypeRef},
115117
visibility::Visibility,
116-
AdtId,
117-
AssocItemId,
118-
AssocItemLoc,
119-
DefWithBodyId,
120-
ImplId,
121-
ItemContainerId,
122-
ItemLoc,
123-
Lookup,
124-
ModuleDefId,
125118
ModuleId,
126-
TraitId,
127119
},
128120
hir_expand::{
129121
name::{known, Name},

0 commit comments

Comments
 (0)