aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Bulatov <[email protected]>2020-03-23 07:59:14 +0000
committerKirill Bulatov <[email protected]>2020-03-24 08:43:00 +0000
commitd5e11b33a36755b139367e1f91a52f5ec27193f6 (patch)
tree87aff5ce7748d74eb59e7ff8304abeeda19e748d
parentd221ff4f9e0e270939a2944a2471bc3f027a674b (diff)
Remove the upcast
-rw-r--r--crates/ra_hir/src/code_model.rs10
1 files changed, 7 insertions, 3 deletions
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 146e7820e..9e4aa6022 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -33,7 +33,11 @@ use ra_syntax::{
33}; 33};
34use rustc_hash::FxHashSet; 34use rustc_hash::FxHashSet;
35 35
36use crate::{db::HirDatabase, has_source::HasSource, CallableDef, HirDisplay, InFile, Name}; 36use crate::{
37 db::{DefDatabase, HirDatabase},
38 has_source::HasSource,
39 CallableDef, HirDisplay, InFile, Name,
40};
37 41
38/// hir::Crate describes a single crate. It's the main interface with which 42/// hir::Crate describes a single crate. It's the main interface with which
39/// a crate's dependencies interact. Mostly, it should be just a proxy for the 43/// a crate's dependencies interact. Mostly, it should be just a proxy for the
@@ -285,10 +289,10 @@ impl Module {
285 /// this module, if possible. 289 /// this module, if possible.
286 pub fn find_use_path( 290 pub fn find_use_path(
287 self, 291 self,
288 db: &dyn HirDatabase, 292 db: &dyn DefDatabase,
289 item: ItemInNs, 293 item: ItemInNs,
290 ) -> Option<hir_def::path::ModPath> { 294 ) -> 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())
292 } 296 }
293} 297}
294 298