mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Move PathResolution
This commit is contained in:
parent
7b6716e50e
commit
7d873fcfa1
3 changed files with 18 additions and 19 deletions
|
@ -24,8 +24,8 @@ use ra_syntax::{
|
|||
};
|
||||
|
||||
use crate::{
|
||||
db::HirDatabase, Adt, Const, EnumVariant, Function, Local, MacroDef, ModPath, ModuleDef, Path,
|
||||
PathKind, Static, Struct, Trait, Type, TypeAlias, TypeParam,
|
||||
db::HirDatabase, semantics::PathResolution, Adt, Const, EnumVariant, Function, Local, MacroDef,
|
||||
ModPath, ModuleDef, Path, PathKind, Static, Struct, Trait, Type, TypeAlias, TypeParam,
|
||||
};
|
||||
|
||||
/// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of
|
||||
|
@ -40,19 +40,6 @@ pub(crate) struct SourceAnalyzer {
|
|||
scopes: Option<Arc<ExprScopes>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub enum PathResolution {
|
||||
/// An item
|
||||
Def(crate::ModuleDef),
|
||||
/// A local binding (only value namespace)
|
||||
Local(Local),
|
||||
/// A generic parameter
|
||||
TypeParam(TypeParam),
|
||||
SelfType(crate::ImplDef),
|
||||
Macro(MacroDef),
|
||||
AssocItem(crate::AssocItem),
|
||||
}
|
||||
|
||||
impl SourceAnalyzer {
|
||||
pub(crate) fn new_for_body(
|
||||
db: &impl HirDatabase,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue