aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_assists
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-03-02 14:09:46 +0000
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-03-02 14:09:46 +0000
commitfd7240837b5fab6b2854bb63aa3b5c7771b4ddc0 (patch)
tree88b876a78136413b8fbdf59a524e1bcf12d17f78 /crates/ra_assists
parent30b87eb88073e48b8cde416ca7ff4eb59e408e20 (diff)
parentf0a9d026fcd8bea1944287b1fe7c6573ca62ca9d (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_assists')
-rw-r--r--crates/ra_assists/src/fill_match_arms.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/fill_match_arms.rs b/crates/ra_assists/src/fill_match_arms.rs
index 30020b56e..6a22b0af5 100644
--- a/crates/ra_assists/src/fill_match_arms.rs
+++ b/crates/ra_assists/src/fill_match_arms.rs
@@ -23,8 +23,8 @@ pub(crate) fn fill_match_arms(mut ctx: AssistCtx<impl HirDatabase>) -> Option<As
23 let function = 23 let function =
24 source_binder::function_from_child_node(ctx.db, ctx.frange.file_id, expr.syntax())?; 24 source_binder::function_from_child_node(ctx.db, ctx.frange.file_id, expr.syntax())?;
25 let infer_result = function.infer(ctx.db); 25 let infer_result = function.infer(ctx.db);
26 let syntax_mapping = function.body_syntax_mapping(ctx.db); 26 let source_map = function.body_source_map(ctx.db);
27 let node_expr = syntax_mapping.node_expr(expr)?; 27 let node_expr = source_map.node_expr(expr)?;
28 let match_expr_ty = infer_result[node_expr].clone(); 28 let match_expr_ty = infer_result[node_expr].clone();
29 let enum_def = match match_expr_ty { 29 let enum_def = match match_expr_ty {
30 Ty::Adt { def_id: AdtDef::Enum(e), .. } => e, 30 Ty::Adt { def_id: AdtDef::Enum(e), .. } => e,