diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-02 14:09:46 +0000 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-03-02 14:09:46 +0000 |
commit | fd7240837b5fab6b2854bb63aa3b5c7771b4ddc0 (patch) | |
tree | 88b876a78136413b8fbdf59a524e1bcf12d17f78 /crates/ra_ide_api/src/completion/complete_struct_literal.rs | |
parent | 30b87eb88073e48b8cde416ca7ff4eb59e408e20 (diff) | |
parent | f0a9d026fcd8bea1944287b1fe7c6573ca62ca9d (diff) |
Merge #915
915: Bring BodySyntaxMapping in line with other source-map instances r=flodiebold a=matklad
* rename to SourceMap
* don't store the actual body inline, just return a pair
r? @flodiebold
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_ide_api/src/completion/complete_struct_literal.rs')
-rw-r--r-- | crates/ra_ide_api/src/completion/complete_struct_literal.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_ide_api/src/completion/complete_struct_literal.rs b/crates/ra_ide_api/src/completion/complete_struct_literal.rs index afb092f59..6bef9624e 100644 --- a/crates/ra_ide_api/src/completion/complete_struct_literal.rs +++ b/crates/ra_ide_api/src/completion/complete_struct_literal.rs | |||
@@ -9,8 +9,8 @@ pub(super) fn complete_struct_literal(acc: &mut Completions, ctx: &CompletionCon | |||
9 | _ => return, | 9 | _ => return, |
10 | }; | 10 | }; |
11 | let infer_result = function.infer(ctx.db); | 11 | let infer_result = function.infer(ctx.db); |
12 | let syntax_mapping = function.body_syntax_mapping(ctx.db); | 12 | let source_map = function.body_source_map(ctx.db); |
13 | let expr = match syntax_mapping.node_expr(struct_lit.into()) { | 13 | let expr = match source_map.node_expr(struct_lit.into()) { |
14 | Some(expr) => expr, | 14 | Some(expr) => expr, |
15 | None => return, | 15 | None => return, |
16 | }; | 16 | }; |