Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir/src/lib.rs')
-rw-r--r--crates/hir/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/crates/hir/src/lib.rs b/crates/hir/src/lib.rs
index 82d2bbb6cf..7f0b0cd48c 100644
--- a/crates/hir/src/lib.rs
+++ b/crates/hir/src/lib.rs
@@ -788,7 +788,7 @@ impl Module {
/// Finds a path that can be used to refer to the given item from within
/// this module, if possible.
- pub fn find_use_path(
+ pub fn find_path(
self,
db: &dyn DefDatabase,
item: impl Into<ItemInNs>,
@@ -799,6 +799,8 @@ impl Module {
db,
item.into().into(),
self.into(),
+ PrefixKind::Plain,
+ false,
prefer_no_std,
prefer_prelude,
)
@@ -806,7 +808,7 @@ impl Module {
/// Finds a path that can be used to refer to the given item from within
/// this module, if possible. This is used for returning import paths for use-statements.
- pub fn find_use_path_prefixed(
+ pub fn find_use_path(
self,
db: &dyn DefDatabase,
item: impl Into<ItemInNs>,
@@ -814,11 +816,12 @@ impl Module {
prefer_no_std: bool,
prefer_prelude: bool,
) -> Option<ModPath> {
- hir_def::find_path::find_path_prefixed(
+ hir_def::find_path::find_path(
db,
item.into().into(),
self.into(),
prefix_kind,
+ true,
prefer_no_std,
prefer_prelude,
)