diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs index 146e7820e6..9e4aa60227 100644 --- a/crates/ra_hir/src/code_model.rs +++ b/crates/ra_hir/src/code_model.rs @@ -33,7 +33,11 @@ use ra_syntax::{ }; 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 /// a crate's dependencies interact. Mostly, it should be just a proxy for the @@ -285,10 +289,10 @@ impl Module { /// this module, if possible. pub fn find_use_path( self, - db: &dyn HirDatabase, + db: &dyn DefDatabase, item: ItemInNs, ) -> Option { - hir_def::find_path::find_path(db.upcast(), item, self.into()) + hir_def::find_path::find_path(db, item, self.into()) } }