diff options
Diffstat (limited to 'crates/ra_assists/src')
-rw-r--r-- | crates/ra_assists/src/handlers/extract_variable.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_assists/src/handlers/extract_variable.rs b/crates/ra_assists/src/handlers/extract_variable.rs index b925a2884..cc62db0c4 100644 --- a/crates/ra_assists/src/handlers/extract_variable.rs +++ b/crates/ra_assists/src/handlers/extract_variable.rs | |||
@@ -1,7 +1,7 @@ | |||
1 | use ra_syntax::{ | 1 | use ra_syntax::{ |
2 | ast::{self, AstNode}, | 2 | ast::{self, AstNode}, |
3 | SyntaxKind::{ | 3 | SyntaxKind::{ |
4 | BLOCK_EXPR, BREAK_EXPR, COMMENT, LAMBDA_EXPR, LOOP_EXPR, MATCH_ARM, PATH_EXPR, RETURN_EXPR, | 4 | BLOCK_EXPR, BREAK_EXPR, CLOSURE_EXPR, COMMENT, LOOP_EXPR, MATCH_ARM, PATH_EXPR, RETURN_EXPR, |
5 | }, | 5 | }, |
6 | SyntaxNode, | 6 | SyntaxNode, |
7 | }; | 7 | }; |
@@ -148,7 +148,7 @@ impl Anchor { | |||
148 | } | 148 | } |
149 | 149 | ||
150 | if let Some(parent) = node.parent() { | 150 | if let Some(parent) = node.parent() { |
151 | if parent.kind() == MATCH_ARM || parent.kind() == LAMBDA_EXPR { | 151 | if parent.kind() == MATCH_ARM || parent.kind() == CLOSURE_EXPR { |
152 | return Some(Anchor::WrapInBlock(node)); | 152 | return Some(Anchor::WrapInBlock(node)); |
153 | } | 153 | } |
154 | } | 154 | } |