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:
bors[bot] 2021-01-10 16:31:32 +00:00 committed by GitHub
commit b3ae7974af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 50 additions and 44 deletions

View file

@ -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());
}
}