diff options
Diffstat (limited to 'crates/ra_analysis/src/completion/complete_path.rs')
-rw-r--r-- | crates/ra_analysis/src/completion/complete_path.rs | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/crates/ra_analysis/src/completion/complete_path.rs b/crates/ra_analysis/src/completion/complete_path.rs index c73a083a4..4723a65a6 100644 --- a/crates/ra_analysis/src/completion/complete_path.rs +++ b/crates/ra_analysis/src/completion/complete_path.rs | |||
@@ -17,7 +17,7 @@ pub(super) fn complete_path(acc: &mut Completions, ctx: &CompletionContext) -> C | |||
17 | let module_scope = module.scope(ctx.db)?; | 17 | let module_scope = module.scope(ctx.db)?; |
18 | module_scope.entries().for_each(|(name, res)| { | 18 | module_scope.entries().for_each(|(name, res)| { |
19 | CompletionItem::new(CompletionKind::Reference, name.to_string()) | 19 | CompletionItem::new(CompletionKind::Reference, name.to_string()) |
20 | .from_resolution(ctx.db, res) | 20 | .from_resolution(ctx, res) |
21 | .add_to(acc) | 21 | .add_to(acc) |
22 | }); | 22 | }); |
23 | } | 23 | } |
@@ -113,4 +113,16 @@ mod tests { | |||
113 | "Foo;Bar", | 113 | "Foo;Bar", |
114 | ); | 114 | ); |
115 | } | 115 | } |
116 | |||
117 | #[test] | ||
118 | fn dont_render_function_parens_in_use_item() { | ||
119 | check_reference_completion( | ||
120 | " | ||
121 | //- /lib.rs | ||
122 | mod m { pub fn foo() {} } | ||
123 | use crate::m::f<|>; | ||
124 | ", | ||
125 | "foo", | ||
126 | ) | ||
127 | } | ||
116 | } | 128 | } |