mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
add db to resolve_path
This commit is contained in:
parent
5b0e347f89
commit
68f66e0f44
2 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ fn complete_path(
|
||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
path.segments.pop();
|
path.segments.pop();
|
||||||
let target_module = match module.resolve_path(path)? {
|
let target_module = match module.resolve_path(db, path)? {
|
||||||
None => return Ok(()),
|
None => return Ok(()),
|
||||||
Some(it) => it,
|
Some(it) => it,
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,7 +133,7 @@ impl ModuleDescriptor {
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn resolve_path(&self, path: Path) -> Cancelable<Option<ModuleDescriptor>> {
|
pub(crate) fn resolve_path(&self, db: &impl DescriptorDatabase, path: Path) -> Cancelable<Option<ModuleDescriptor>> {
|
||||||
let res = match self.do_resolve_path(path) {
|
let res = match self.do_resolve_path(path) {
|
||||||
None => return Ok(None),
|
None => return Ok(None),
|
||||||
Some(it) => it,
|
Some(it) => it,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue