diff options
author | Florian Diebold <[email protected]> | 2018-12-25 16:43:58 +0000 |
---|---|---|
committer | Florian Diebold <[email protected]> | 2018-12-25 16:43:58 +0000 |
commit | 3e4d41d1e409315ce42cb3c3479236b5e73d0643 (patch) | |
tree | 0ae517904e3324d7a9779fb83e11574e1427ee29 /crates/ra_analysis/src/completion/complete_dot.rs | |
parent | 3befd1a9e82809fef5bc68950d3265dbcbbd5527 (diff) |
Determine receiver for completion in a more robust way
Also rename a parameter.
Diffstat (limited to 'crates/ra_analysis/src/completion/complete_dot.rs')
-rw-r--r-- | crates/ra_analysis/src/completion/complete_dot.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/completion/complete_dot.rs b/crates/ra_analysis/src/completion/complete_dot.rs index fa62da210..93d657576 100644 --- a/crates/ra_analysis/src/completion/complete_dot.rs +++ b/crates/ra_analysis/src/completion/complete_dot.rs | |||
@@ -33,9 +33,9 @@ pub(super) fn complete_dot(acc: &mut Completions, ctx: &CompletionContext) -> Ca | |||
33 | Ok(()) | 33 | Ok(()) |
34 | } | 34 | } |
35 | 35 | ||
36 | fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, ty: Ty) -> Cancelable<()> { | 36 | fn complete_fields(acc: &mut Completions, ctx: &CompletionContext, receiver: Ty) -> Cancelable<()> { |
37 | // TODO: autoderef etc. | 37 | // TODO: autoderef etc. |
38 | match ty { | 38 | match receiver { |
39 | Ty::Adt { def_id, .. } => { | 39 | Ty::Adt { def_id, .. } => { |
40 | match def_id.resolve(ctx.db)? { | 40 | match def_id.resolve(ctx.db)? { |
41 | Def::Struct(s) => { | 41 | Def::Struct(s) => { |