Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir_def/src/find_path.rs')
-rw-r--r--crates/hir_def/src/find_path.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/crates/hir_def/src/find_path.rs b/crates/hir_def/src/find_path.rs
index 3251638c7a..22d593a7d9 100644
--- a/crates/hir_def/src/find_path.rs
+++ b/crates/hir_def/src/find_path.rs
@@ -35,7 +35,12 @@ pub fn find_path_prefixed(
const MAX_PATH_LEN: usize = 15;
-impl ModPath {
+trait ModPathExt {
+ fn starts_with_std(&self) -> bool;
+ fn can_start_with_std(&self) -> bool;
+}
+
+impl ModPathExt for ModPath {
fn starts_with_std(&self) -> bool {
self.segments().first() == Some(&known::std)
}