3
3
use std:: sync:: Arc ;
4
4
5
5
use hir_expand:: name:: { known, AsName , Name } ;
6
+ use ra_prof:: profile;
6
7
use test_utils:: tested_by;
7
8
8
9
use crate :: {
@@ -18,7 +19,7 @@ use crate::{
18
19
/// Find a path that can be used to refer to a certain item. This can depend on
19
20
/// *from where* you're referring to the item, hence the `from` parameter.
20
21
pub fn find_path ( db : & dyn DefDatabase , item : ItemInNs , from : ModuleId ) -> Option < ModPath > {
21
- let _p = ra_prof :: profile ( "find_path" ) ;
22
+ let _p = profile ( "find_path" ) ;
22
23
find_path_inner ( db, item, from, MAX_PATH_LEN )
23
24
}
24
25
@@ -213,11 +214,12 @@ fn find_importable_locations(
213
214
///
214
215
/// Note that the crate doesn't need to be the one in which the item is defined;
215
216
/// it might be re-exported in other crates.
216
- pub ( crate ) fn importable_locations_in_crate (
217
+ pub ( crate ) fn importable_locations_of_query (
217
218
db : & dyn DefDatabase ,
218
219
item : ItemInNs ,
219
220
krate : CrateId ,
220
221
) -> Arc < [ ( ModuleId , Name , Visibility ) ] > {
222
+ let _p = profile ( "importable_locations_of_query" ) ;
221
223
let def_map = db. crate_def_map ( krate) ;
222
224
let mut result = Vec :: new ( ) ;
223
225
for ( local_id, data) in def_map. modules . iter ( ) {
0 commit comments