mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Remove the upcast
This commit is contained in:
parent
d221ff4f9e
commit
d5e11b33a3
1 changed files with 7 additions and 3 deletions
|
@ -33,7 +33,11 @@ use ra_syntax::{
|
||||||
};
|
};
|
||||||
use rustc_hash::FxHashSet;
|
use rustc_hash::FxHashSet;
|
||||||
|
|
||||||
use crate::{db::HirDatabase, has_source::HasSource, CallableDef, HirDisplay, InFile, Name};
|
use crate::{
|
||||||
|
db::{DefDatabase, HirDatabase},
|
||||||
|
has_source::HasSource,
|
||||||
|
CallableDef, HirDisplay, InFile, Name,
|
||||||
|
};
|
||||||
|
|
||||||
/// hir::Crate describes a single crate. It's the main interface with which
|
/// hir::Crate describes a single crate. It's the main interface with which
|
||||||
/// a crate's dependencies interact. Mostly, it should be just a proxy for the
|
/// a crate's dependencies interact. Mostly, it should be just a proxy for the
|
||||||
|
@ -285,10 +289,10 @@ impl Module {
|
||||||
/// this module, if possible.
|
/// this module, if possible.
|
||||||
pub fn find_use_path(
|
pub fn find_use_path(
|
||||||
self,
|
self,
|
||||||
db: &dyn HirDatabase,
|
db: &dyn DefDatabase,
|
||||||
item: ItemInNs,
|
item: ItemInNs,
|
||||||
) -> Option<hir_def::path::ModPath> {
|
) -> Option<hir_def::path::ModPath> {
|
||||||
hir_def::find_path::find_path(db.upcast(), item, self.into())
|
hir_def::find_path::find_path(db, item, self.into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue