Skip to content

Commit d5e11b3

Browse files
Remove the upcast
1 parent d221ff4 commit d5e11b3

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

crates/ra_hir/src/code_model.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,11 @@ use ra_syntax::{
3333
};
3434
use rustc_hash::FxHashSet;
3535

36-
use crate::{db::HirDatabase, has_source::HasSource, CallableDef, HirDisplay, InFile, Name};
36+
use crate::{
37+
db::{DefDatabase, HirDatabase},
38+
has_source::HasSource,
39+
CallableDef, HirDisplay, InFile, Name,
40+
};
3741

3842
/// hir::Crate describes a single crate. It's the main interface with which
3943
/// a crate's dependencies interact. Mostly, it should be just a proxy for the
@@ -285,10 +289,10 @@ impl Module {
285289
/// this module, if possible.
286290
pub fn find_use_path(
287291
self,
288-
db: &dyn HirDatabase,
292+
db: &dyn DefDatabase,
289293
item: ItemInNs,
290294
) -> Option<hir_def::path::ModPath> {
291-
hir_def::find_path::find_path(db.upcast(), item, self.into())
295+
hir_def::find_path::find_path(db, item, self.into())
292296
}
293297
}
294298

0 commit comments

Comments
 (0)