move path to descriptors
This commit is contained in:
parent
8954d4dc67
commit
d47075af52
2 changed files with 16 additions and 15 deletions
|
@ -5,7 +5,7 @@ use std::sync::Arc;
|
|||
|
||||
use ra_syntax::{
|
||||
ast::{self, AstNode, FnDefNode},
|
||||
TextRange,
|
||||
TextRange, SmolStr,
|
||||
};
|
||||
|
||||
use crate::{
|
||||
|
@ -50,6 +50,20 @@ salsa::query_group! {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
pub(crate) struct Path {
|
||||
kind: PathKind,
|
||||
segments: Vec<SmolStr>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub(crate) enum PathKind {
|
||||
Abs,
|
||||
Self_,
|
||||
Super,
|
||||
Crate,
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct ReferenceDescriptor {
|
||||
pub range: TextRange,
|
||||
|
|
|
@ -15,6 +15,7 @@ use crate::{
|
|||
Cancelable,
|
||||
loc2id::{DefId, DefLoc},
|
||||
descriptors::{
|
||||
Path, PathKind,
|
||||
DescriptorDatabase,
|
||||
module::{ModuleId, ModuleTree, ModuleSourceNode},
|
||||
},
|
||||
|
@ -59,20 +60,6 @@ enum ImportKind {
|
|||
Named(LocalSyntaxPtr),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq)]
|
||||
struct Path {
|
||||
kind: PathKind,
|
||||
segments: Vec<SmolStr>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
enum PathKind {
|
||||
Abs,
|
||||
Self_,
|
||||
Super,
|
||||
Crate,
|
||||
}
|
||||
|
||||
pub(crate) fn input_module_items(
|
||||
db: &impl DescriptorDatabase,
|
||||
source_root: SourceRootId,
|
||||
|
|
Loading…
Reference in a new issue