Skip to content

Commit 01bd1e1

Browse files
committed
Move public API to the top
1 parent 908da9a commit 01bd1e1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

crates/ra_hir_def/src/find_path.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ use crate::{
1313
CrateId, ModuleDefId, ModuleId,
1414
};
1515

16+
// FIXME: handle local items
17+
18+
/// 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.
20+
pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> {
21+
let _p = ra_prof::profile("find_path");
22+
find_path_inner(db, item, from, MAX_PATH_LEN)
23+
}
24+
1625
const MAX_PATH_LEN: usize = 15;
1726

1827
impl ModPath {
@@ -39,15 +48,6 @@ impl ModPath {
3948
}
4049
}
4150

42-
// FIXME: handle local items
43-
44-
/// Find a path that can be used to refer to a certain item. This can depend on
45-
/// *from where* you're referring to the item, hence the `from` parameter.
46-
pub fn find_path(db: &dyn DefDatabase, item: ItemInNs, from: ModuleId) -> Option<ModPath> {
47-
let _p = ra_prof::profile("find_path");
48-
find_path_inner(db, item, from, MAX_PATH_LEN)
49-
}
50-
5151
fn find_path_inner(
5252
db: &dyn DefDatabase,
5353
item: ItemInNs,

0 commit comments

Comments
 (0)