From 5c5bde47fb759440d007c90fd83021de538120b8 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Fri, 10 Apr 2020 17:06:57 +0200 Subject: Rename some tokens --- crates/ra_ide/src/completion/complete_trait_impl.rs | 4 ++-- crates/ra_ide/src/syntax_tree.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'crates/ra_ide') diff --git a/crates/ra_ide/src/completion/complete_trait_impl.rs b/crates/ra_ide/src/completion/complete_trait_impl.rs index ded1ff3bc..fab02945c 100644 --- a/crates/ra_ide/src/completion/complete_trait_impl.rs +++ b/crates/ra_ide/src/completion/complete_trait_impl.rs @@ -35,7 +35,7 @@ use hir::{self, Docs, HasSource}; use ra_assists::utils::get_missing_impl_items; use ra_syntax::{ ast::{self, edit, ImplDef}, - AstNode, SyntaxKind, SyntaxNode, TextRange, + AstNode, SyntaxKind, SyntaxNode, TextRange, T, }; use ra_text_edit::TextEdit; @@ -204,7 +204,7 @@ fn make_const_compl_syntax(const_: &ast::ConstDef) -> String { let end = const_ .syntax() .children_with_tokens() - .find(|s| s.kind() == SyntaxKind::SEMI || s.kind() == SyntaxKind::EQ) + .find(|s| s.kind() == T![;] || s.kind() == T![=]) .map_or(const_end, |f| f.text_range().start()); let len = end - start; diff --git a/crates/ra_ide/src/syntax_tree.rs b/crates/ra_ide/src/syntax_tree.rs index f58e436d1..5842ae2e8 100644 --- a/crates/ra_ide/src/syntax_tree.rs +++ b/crates/ra_ide/src/syntax_tree.rs @@ -165,7 +165,7 @@ SOURCE_FILE@[0; 60) PATH_SEGMENT@[16; 22) NAME_REF@[16; 22) IDENT@[16; 22) "assert" - EXCL@[22; 23) "!" + BANG@[22; 23) "!" TOKEN_TREE@[23; 57) L_PAREN@[23; 24) "(" STRING@[24; 52) "\"\n fn foo() {\n ..." @@ -173,7 +173,7 @@ SOURCE_FILE@[0; 60) WHITESPACE@[53; 54) " " STRING@[54; 56) "\"\"" R_PAREN@[56; 57) ")" - SEMI@[57; 58) ";" + SEMICOLON@[57; 58) ";" WHITESPACE@[58; 59) "\n" R_CURLY@[59; 60) "}" "# @@ -226,7 +226,7 @@ EXPR_STMT@[16; 58) PATH_SEGMENT@[16; 22) NAME_REF@[16; 22) IDENT@[16; 22) "assert" - EXCL@[22; 23) "!" + BANG@[22; 23) "!" TOKEN_TREE@[23; 57) L_PAREN@[23; 24) "(" STRING@[24; 52) "\"\n fn foo() {\n ..." @@ -234,7 +234,7 @@ EXPR_STMT@[16; 58) WHITESPACE@[53; 54) " " STRING@[54; 56) "\"\"" R_PAREN@[56; 57) ")" - SEMI@[57; 58) ";" + SEMICOLON@[57; 58) ";" "# .trim() ); -- cgit v1.2.3