aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/assists/introduce_variable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src/assists/introduce_variable.rs')
-rw-r--r--crates/ra_editor/src/assists/introduce_variable.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_editor/src/assists/introduce_variable.rs b/crates/ra_editor/src/assists/introduce_variable.rs
index 782861023..523ec7034 100644
--- a/crates/ra_editor/src/assists/introduce_variable.rs
+++ b/crates/ra_editor/src/assists/introduce_variable.rs
@@ -1,7 +1,7 @@
1use ra_syntax::{ 1use ra_syntax::{
2 ast::{self, AstNode}, 2 ast::{self, AstNode},
3 SyntaxKind::WHITESPACE, 3 SyntaxKind::WHITESPACE,
4 SyntaxNodeRef, TextUnit, 4 SyntaxNode, TextUnit,
5}; 5};
6 6
7use crate::assists::{AssistCtx, Assist}; 7use crate::assists::{AssistCtx, Assist};
@@ -39,7 +39,7 @@ pub fn introduce_variable<'a>(ctx: AssistCtx) -> Option<Assist> {
39 39
40/// Statement or last in the block expression, which will follow 40/// Statement or last in the block expression, which will follow
41/// the freshly introduced var. 41/// the freshly introduced var.
42fn anchor_stmt(expr: ast::Expr) -> Option<SyntaxNodeRef> { 42fn anchor_stmt(expr: &ast::Expr) -> Option<&SyntaxNode> {
43 expr.syntax().ancestors().find(|&node| { 43 expr.syntax().ancestors().find(|&node| {
44 if ast::Stmt::cast(node).is_some() { 44 if ast::Stmt::cast(node).is_some() {
45 return true; 45 return true;