apply T! macro where it is possible

This commit is contained in:
Sergey Parilin 2019-05-15 15:35:47 +03:00
parent d77175ce28
commit 993abedd77
38 changed files with 619 additions and 623 deletions

View file

@ -1,6 +1,6 @@
use rustc_hash::FxHashSet;
use ra_syntax::{ast, AstNode, TextRange, Direction, SyntaxKind::*, SyntaxElement};
use ra_syntax::{ast, AstNode, TextRange, Direction, SyntaxKind::*, SyntaxElement, T};
use ra_db::SourceDatabase;
use crate::{FileId, db::RootDatabase};
@ -40,7 +40,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
let mut range_end = name_ref.syntax().range().end();
for sibling in path.syntax().siblings_with_tokens(Direction::Next) {
match sibling.kind() {
EXCL | IDENT => range_end = sibling.range().end(),
T![!] | IDENT => range_end = sibling.range().end(),
_ => (),
}
}