aboutsummaryrefslogtreecommitdiff
path: root/crates/assists/src/handlers/extract_variable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/assists/src/handlers/extract_variable.rs')
-rw-r--r--crates/assists/src/handlers/extract_variable.rs2
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);