diff options
Diffstat (limited to 'crates/ide_completion/src/completions/unqualified_path.rs')
-rw-r--r-- | crates/ide_completion/src/completions/unqualified_path.rs | 34 |
1 files changed, 1 insertions, 33 deletions
diff --git a/crates/ide_completion/src/completions/unqualified_path.rs b/crates/ide_completion/src/completions/unqualified_path.rs index 2868d9b18..6f96eceb9 100644 --- a/crates/ide_completion/src/completions/unqualified_path.rs +++ b/crates/ide_completion/src/completions/unqualified_path.rs | |||
@@ -25,7 +25,7 @@ pub(crate) fn complete_unqualified_path(acc: &mut Completions, ctx: &CompletionC | |||
25 | return; | 25 | return; |
26 | } | 26 | } |
27 | 27 | ||
28 | if ctx.expects_use_tree() { | 28 | if ctx.in_use_tree() { |
29 | // only show modules in a fresh UseTree | 29 | // only show modules in a fresh UseTree |
30 | cov_mark::hit!(only_completes_modules_in_import); | 30 | cov_mark::hit!(only_completes_modules_in_import); |
31 | ctx.scope.process_all_names(&mut |name, res| { | 31 | ctx.scope.process_all_names(&mut |name, res| { |
@@ -130,22 +130,6 @@ fn foo() { | |||
130 | } | 130 | } |
131 | 131 | ||
132 | #[test] | 132 | #[test] |
133 | fn only_completes_modules_in_import() { | ||
134 | cov_mark::check!(only_completes_modules_in_import); | ||
135 | check( | ||
136 | r#" | ||
137 | use f$0 | ||
138 | |||
139 | struct Foo; | ||
140 | mod foo {} | ||
141 | "#, | ||
142 | expect![[r#" | ||
143 | md foo | ||
144 | "#]], | ||
145 | ); | ||
146 | } | ||
147 | |||
148 | #[test] | ||
149 | fn bind_pat_and_path_ignore_at() { | 133 | fn bind_pat_and_path_ignore_at() { |
150 | check( | 134 | check( |
151 | r#" | 135 | r#" |
@@ -359,22 +343,6 @@ fn _alpha() {} | |||
359 | } | 343 | } |
360 | 344 | ||
361 | #[test] | 345 | #[test] |
362 | fn completes_extern_prelude() { | ||
363 | check( | ||
364 | r#" | ||
365 | //- /lib.rs crate:main deps:other_crate | ||
366 | use $0; | ||
367 | |||
368 | //- /other_crate/lib.rs crate:other_crate | ||
369 | // nothing here | ||
370 | "#, | ||
371 | expect![[r#" | ||
372 | md other_crate | ||
373 | "#]], | ||
374 | ); | ||
375 | } | ||
376 | |||
377 | #[test] | ||
378 | fn completes_module_items_in_nested_modules() { | 346 | fn completes_module_items_in_nested_modules() { |
379 | check( | 347 | check( |
380 | r#" | 348 | r#" |