From 2e2642efccd5855e4158b01a006e7884a96982bb Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 30 Jul 2020 20:51:43 +0200 Subject: Remove TypeAscriptionOwner --- crates/ra_ide/src/references/rename.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'crates/ra_ide/src/references') diff --git a/crates/ra_ide/src/references/rename.rs b/crates/ra_ide/src/references/rename.rs index d330109f1..31654bf79 100644 --- a/crates/ra_ide/src/references/rename.rs +++ b/crates/ra_ide/src/references/rename.rs @@ -7,7 +7,8 @@ use ra_ide_db::{ RootDatabase, }; use ra_syntax::{ - algo::find_node_at_offset, ast, ast::NameOwner, ast::TypeAscriptionOwner, + algo::find_node_at_offset, + ast::{self, NameOwner}, lex_single_valid_syntax_kind, match_ast, AstNode, SyntaxKind, SyntaxNode, SyntaxToken, }; use ra_text_edit::TextEdit; @@ -155,7 +156,7 @@ fn rename_to_self( return None; // method already has self param } let first_param = params.params().next()?; - let mutable = match first_param.ascribed_type() { + let mutable = match first_param.ty() { Some(ast::TypeRef::ReferenceType(rt)) => rt.mut_token().is_some(), _ => return None, // not renaming other types }; -- cgit v1.2.3