mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
apply T! macro where it is possible
This commit is contained in:
parent
d77175ce28
commit
993abedd77
38 changed files with 619 additions and 623 deletions
|
@ -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(),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue