mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Merge #7239
7239: Replace SyntaxKind usage with T! macro where applicable r=lnicola a=Veykril https://github.com/rust-analyzer/rust-analyzer/blob/master/docs/dev/style.md#token-names Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
commit
b3ae7974af
12 changed files with 50 additions and 44 deletions
|
@ -119,7 +119,7 @@ fn is_metavariable(element: SyntaxElement) -> Option<TextRange> {
|
|||
let tok = element.as_token()?;
|
||||
match tok.kind() {
|
||||
kind if kind == SyntaxKind::IDENT || kind.is_keyword() => {
|
||||
if let Some(_dollar) = tok.prev_token().filter(|t| t.kind() == SyntaxKind::DOLLAR) {
|
||||
if let Some(_dollar) = tok.prev_token().filter(|t| t.kind() == T![$]) {
|
||||
return Some(tok.text_range());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue