mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Privatise nameres
This commit is contained in:
parent
158b1cb524
commit
6bdd5fa461
7 changed files with 12 additions and 10 deletions
|
@ -9,7 +9,7 @@ use hir_def::{
|
||||||
body::scope::ExprScopes,
|
body::scope::ExprScopes,
|
||||||
builtin_type::BuiltinType,
|
builtin_type::BuiltinType,
|
||||||
docs::Documentation,
|
docs::Documentation,
|
||||||
nameres::per_ns::PerNs,
|
per_ns::PerNs,
|
||||||
resolver::{HasResolver, TypeNs},
|
resolver::{HasResolver, TypeNs},
|
||||||
type_ref::TypeRef,
|
type_ref::TypeRef,
|
||||||
ContainerId, HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId,
|
ContainerId, HasModule, ImplId, LocalEnumVariantId, LocalImportId, LocalModuleId,
|
||||||
|
|
|
@ -21,17 +21,16 @@ pub mod resolver;
|
||||||
pub mod data;
|
pub mod data;
|
||||||
pub mod lang_item;
|
pub mod lang_item;
|
||||||
pub mod docs;
|
pub mod docs;
|
||||||
|
pub mod per_ns;
|
||||||
|
|
||||||
mod trace;
|
mod trace;
|
||||||
|
mod nameres;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test_db;
|
mod test_db;
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod marks;
|
mod marks;
|
||||||
|
|
||||||
// FIXME: this should be private
|
|
||||||
pub mod nameres;
|
|
||||||
|
|
||||||
use std::hash::{Hash, Hasher};
|
use std::hash::{Hash, Hasher};
|
||||||
|
|
||||||
use hir_expand::{ast_id_map::FileAstId, db::AstDatabase, AstId, HirFileId, MacroDefId, Source};
|
use hir_expand::{ast_id_map::FileAstId, db::AstDatabase, AstId, HirFileId, MacroDefId, Source};
|
||||||
|
|
|
@ -47,8 +47,7 @@
|
||||||
//! path and, upon success, we run macro expansion and "collect module" phase on
|
//! path and, upon success, we run macro expansion and "collect module" phase on
|
||||||
//! the result
|
//! the result
|
||||||
|
|
||||||
pub mod raw;
|
pub(crate) mod raw;
|
||||||
pub mod per_ns;
|
|
||||||
mod collector;
|
mod collector;
|
||||||
mod mod_resolution;
|
mod mod_resolution;
|
||||||
mod path_resolution;
|
mod path_resolution;
|
||||||
|
@ -72,8 +71,9 @@ use rustc_hash::{FxHashMap, FxHashSet};
|
||||||
use crate::{
|
use crate::{
|
||||||
builtin_type::BuiltinType,
|
builtin_type::BuiltinType,
|
||||||
db::DefDatabase,
|
db::DefDatabase,
|
||||||
nameres::{diagnostics::DefDiagnostic, path_resolution::ResolveMode, per_ns::PerNs},
|
nameres::{diagnostics::DefDiagnostic, path_resolution::ResolveMode},
|
||||||
path::Path,
|
path::Path,
|
||||||
|
per_ns::PerNs,
|
||||||
AstId, FunctionId, ImplId, LocalImportId, LocalModuleId, ModuleDefId, ModuleId, TraitId,
|
AstId, FunctionId, ImplId, LocalImportId, LocalModuleId, ModuleDefId, ModuleId, TraitId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,10 @@ use crate::{
|
||||||
db::DefDatabase,
|
db::DefDatabase,
|
||||||
nameres::{
|
nameres::{
|
||||||
diagnostics::DefDiagnostic, mod_resolution::ModDir, path_resolution::ReachedFixedPoint,
|
diagnostics::DefDiagnostic, mod_resolution::ModDir, path_resolution::ReachedFixedPoint,
|
||||||
per_ns::PerNs, raw, CrateDefMap, ModuleData, Resolution, ResolveMode,
|
raw, CrateDefMap, ModuleData, Resolution, ResolveMode,
|
||||||
},
|
},
|
||||||
path::{Path, PathKind},
|
path::{Path, PathKind},
|
||||||
|
per_ns::PerNs,
|
||||||
AdtId, AstId, AstItemDef, ConstLoc, ContainerId, EnumId, EnumVariantId, FunctionLoc, ImplId,
|
AdtId, AstId, AstItemDef, ConstLoc, ContainerId, EnumId, EnumVariantId, FunctionLoc, ImplId,
|
||||||
Intern, LocalImportId, LocalModuleId, LocationCtx, ModuleDefId, ModuleId, StaticId, StructId,
|
Intern, LocalImportId, LocalModuleId, LocationCtx, ModuleDefId, ModuleId, StaticId, StructId,
|
||||||
StructOrUnionId, TraitId, TypeAliasLoc, UnionId,
|
StructOrUnionId, TraitId, TypeAliasLoc, UnionId,
|
||||||
|
|
|
@ -16,8 +16,9 @@ use test_utils::tested_by;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
db::DefDatabase,
|
db::DefDatabase,
|
||||||
nameres::{per_ns::PerNs, CrateDefMap},
|
nameres::CrateDefMap,
|
||||||
path::{Path, PathKind},
|
path::{Path, PathKind},
|
||||||
|
per_ns::PerNs,
|
||||||
AdtId, EnumVariantId, LocalModuleId, ModuleDefId, ModuleId,
|
AdtId, EnumVariantId, LocalModuleId, ModuleDefId, ModuleId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,9 @@ use crate::{
|
||||||
db::DefDatabase,
|
db::DefDatabase,
|
||||||
expr::{ExprId, PatId},
|
expr::{ExprId, PatId},
|
||||||
generics::GenericParams,
|
generics::GenericParams,
|
||||||
nameres::{per_ns::PerNs, CrateDefMap},
|
nameres::CrateDefMap,
|
||||||
path::{Path, PathKind},
|
path::{Path, PathKind},
|
||||||
|
per_ns::PerNs,
|
||||||
AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, FunctionId,
|
AdtId, AstItemDef, ConstId, ContainerId, DefWithBodyId, EnumId, EnumVariantId, FunctionId,
|
||||||
GenericDefId, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, StaticId, StructId,
|
GenericDefId, ImplId, LocalModuleId, Lookup, ModuleDefId, ModuleId, StaticId, StructId,
|
||||||
TraitId, TypeAliasId,
|
TraitId, TypeAliasId,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue