diff options
author | Aleksey Kladov <[email protected]> | 2021-01-05 12:45:46 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-01-05 12:51:13 +0000 |
commit | f9707cde6801f13cc4c20e3e08cee07ef23b8563 (patch) | |
tree | 56be395be11c1315ace19c50ad528c0af5ac0a16 /crates/assists/src/handlers/extract_variable.rs | |
parent | 5c10f2f705d6757b9821387a5be759789b7ee480 (diff) |
Rename expr -> tail_expr
Diffstat (limited to 'crates/assists/src/handlers/extract_variable.rs')
-rw-r--r-- | crates/assists/src/handlers/extract_variable.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/assists/src/handlers/extract_variable.rs b/crates/assists/src/handlers/extract_variable.rs index 9957012fe..291809205 100644 --- a/crates/assists/src/handlers/extract_variable.rs +++ b/crates/assists/src/handlers/extract_variable.rs | |||
@@ -139,7 +139,7 @@ impl Anchor { | |||
139 | fn from(to_extract: &ast::Expr) -> Option<Anchor> { | 139 | fn from(to_extract: &ast::Expr) -> Option<Anchor> { |
140 | to_extract.syntax().ancestors().find_map(|node| { | 140 | to_extract.syntax().ancestors().find_map(|node| { |
141 | if let Some(expr) = | 141 | if let Some(expr) = |
142 | node.parent().and_then(ast::BlockExpr::cast).and_then(|it| it.expr()) | 142 | node.parent().and_then(ast::BlockExpr::cast).and_then(|it| it.tail_expr()) |
143 | { | 143 | { |
144 | if expr.syntax() == &node { | 144 | if expr.syntax() == &node { |
145 | mark::hit!(test_extract_var_last_expr); | 145 | mark::hit!(test_extract_var_last_expr); |