aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_def/src/find_path.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_def/src/find_path.rs')
-rw-r--r--crates/ra_hir_def/src/find_path.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs
index 06701a830..46e70eb48 100644
--- a/crates/ra_hir_def/src/find_path.rs
+++ b/crates/ra_hir_def/src/find_path.rs
@@ -1,7 +1,6 @@
1//! An algorithm to find a path to refer to a certain item. 1//! An algorithm to find a path to refer to a certain item.
2 2
3use hir_expand::name::{known, AsName, Name}; 3use hir_expand::name::{known, AsName, Name};
4use ra_prof::profile;
5use rustc_hash::FxHashSet; 4use rustc_hash::FxHashSet;
6use test_utils::mark; 5use test_utils::mark;
7 6
@@ -18,7 +17,7 @@ use crate::{
18/// Find a path that can be used to refer to a certain item. This can depend on 17/// Find a path that can be used to refer to a certain item. This can depend on
19/// *from where* you're referring to the item, hence the `from` parameter. 18/// *from where* you're referring to the item, hence the `from` parameter.
20pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> { 19pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> {
21 let _p = profile("find_path"); 20 let _p = profile::span("find_path");
22 find_path_inner(db, item, from, MAX_PATH_LEN) 21 find_path_inner(db, item, from, MAX_PATH_LEN)
23} 22}
24 23
@@ -215,7 +214,7 @@ fn find_local_import_locations(
215 item: ItemInNs, 214 item: ItemInNs,
216 from: ModuleId, 215 from: ModuleId,
217) -> Vec<(ModuleId, Name)> { 216) -> Vec<(ModuleId, Name)> {
218 let _p = profile("find_local_import_locations"); 217 let _p = profile::span("find_local_import_locations");
219 218
220 // `from` can import anything below `from` with visibility of at least `from`, and anything 219 // `from` can import anything below `from` with visibility of at least `from`, and anything
221 // above `from` with any visibility. That means we do not need to descend into private siblings 220 // above `from` with any visibility. That means we do not need to descend into private siblings