aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_editor/src/assists
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_editor/src/assists')
-rw-r--r--crates/ra_editor/src/assists/add_derive.rs2
-rw-r--r--crates/ra_editor/src/assists/change_visibility.rs2
-rw-r--r--crates/ra_editor/src/assists/introduce_variable.rs4
3 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_editor/src/assists/add_derive.rs b/crates/ra_editor/src/assists/add_derive.rs
index 1e2cd4f30..6e964d011 100644
--- a/crates/ra_editor/src/assists/add_derive.rs
+++ b/crates/ra_editor/src/assists/add_derive.rs
@@ -28,7 +28,7 @@ pub fn add_derive(ctx: AssistCtx) -> Option<Assist> {
28} 28}
29 29
30// Insert `derive` after doc comments. 30// Insert `derive` after doc comments.
31fn derive_insertion_offset(nominal: ast::NominalDef) -> Option<TextUnit> { 31fn derive_insertion_offset(nominal: &ast::NominalDef) -> Option<TextUnit> {
32 let non_ws_child = nominal 32 let non_ws_child = nominal
33 .syntax() 33 .syntax()
34 .children() 34 .children()
diff --git a/crates/ra_editor/src/assists/change_visibility.rs b/crates/ra_editor/src/assists/change_visibility.rs
index 6c8466394..89729e2c2 100644
--- a/crates/ra_editor/src/assists/change_visibility.rs
+++ b/crates/ra_editor/src/assists/change_visibility.rs
@@ -46,7 +46,7 @@ fn add_vis(ctx: AssistCtx) -> Option<Assist> {
46 }) 46 })
47} 47}
48 48
49fn change_vis(ctx: AssistCtx, vis: ast::Visibility) -> Option<Assist> { 49fn change_vis(ctx: AssistCtx, vis: &ast::Visibility) -> Option<Assist> {
50 if vis.syntax().text() != "pub" { 50 if vis.syntax().text() != "pub" {
51 return None; 51 return None;
52 } 52 }
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;