aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_def/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_def/src')
-rw-r--r--crates/hir_def/src/import_map.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/crates/hir_def/src/import_map.rs b/crates/hir_def/src/import_map.rs
index 30b22f51d..810a4a268 100644
--- a/crates/hir_def/src/import_map.rs
+++ b/crates/hir_def/src/import_map.rs
@@ -749,6 +749,30 @@ mod tests {
749 } 749 }
750 750
751 #[test] 751 #[test]
752 fn fuzzy_import_trait() {
753 let ra_fixture = r#"
754 //- /main.rs crate:main deps:dep
755 //- /dep.rs crate:dep
756 pub mod fmt {
757 pub trait Display {
758 fn fmttt();
759 }
760 }
761 "#;
762
763 check_search(
764 ra_fixture,
765 "main",
766 Query::new("fmt".to_string()).search_mode(SearchMode::Fuzzy),
767 expect![[r#"
768 dep::fmt (t)
769 dep::fmt::Display (t)
770 dep::fmt::Display::fmttt (f)
771 "#]],
772 );
773 }
774
775 #[test]
752 fn search_mode() { 776 fn search_mode() {
753 let ra_fixture = r#" 777 let ra_fixture = r#"
754 //- /main.rs crate:main deps:dep 778 //- /main.rs crate:main deps:dep