diff options
author | Aleksey Kladov <[email protected]> | 2019-07-19 10:56:47 +0100 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-07-19 11:16:25 +0100 |
commit | f1abc7bdc63fedd5a699b4c495bb23f1b6d254f9 (patch) | |
tree | 9518c43f5ddeaa38426efddc17be19af5381f003 /crates/ra_ide_api/src/completion/complete_dot.rs | |
parent | 0343c4a815a0e82d5e55e76a01d21b0f7a00ff5b (diff) |
migrate ra_ide_api to the new rowan
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_dot.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_dot.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_dot.rs b/crates/ra_ide_api/src/completion/complete_dot.rs index a5f071442..536ba36df 100644 --- a/crates/ra_ide_api/src/completion/complete_dot.rs +++ b/crates/ra_ide_api/src/completion/complete_dot.rs | |||
@@ -5,10 +5,11 @@ use rustc_hash::FxHashSet; | |||
5 | 5 | ||
6 | /// Complete dot accesses, i.e. fields or methods (currently only fields). | 6 | /// Complete dot accesses, i.e. fields or methods (currently only fields). |
7 | pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) { | 7 | pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) { |
8 | let receiver_ty = match ctx.dot_receiver.and_then(|it| ctx.analyzer.type_of(ctx.db, it)) { | 8 | let receiver_ty = |
9 | Some(it) => it, | 9 | match ctx.dot_receiver.as_ref().and_then(|it| ctx.analyzer.type_of(ctx.db, it)) { |
10 | None => return, | 10 | Some(it) => it, |
11 | }; | 11 | None => return, |
12 | }; | ||
12 | if !ctx.is_call { | 13 | if !ctx.is_call { |
13 | complete_fields(acc, ctx, receiver_ty.clone()); | 14 | complete_fields(acc, ctx, receiver_ty.clone()); |
14 | } | 15 | } |