diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-01-10 16:31:32 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2021-01-10 16:31:32 +0000 |
commit | b3ae7974affd401493982fb704aec7adfdb0455e (patch) | |
tree | 8caf3e2d888d1c376ac2b673c8ebd86528bd4133 /crates/ide/src/syntax_highlighting | |
parent | 13b205ec0bd403246937f89697895b2029454598 (diff) | |
parent | e618d129030b10ddd55d76c3e451799c7dba3f8d (diff) |
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 <[email protected]>
Diffstat (limited to 'crates/ide/src/syntax_highlighting')
-rw-r--r-- | crates/ide/src/syntax_highlighting/macro_rules.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/syntax_highlighting/macro_rules.rs b/crates/ide/src/syntax_highlighting/macro_rules.rs index 21d8a9835..44620e912 100644 --- a/crates/ide/src/syntax_highlighting/macro_rules.rs +++ b/crates/ide/src/syntax_highlighting/macro_rules.rs | |||
@@ -119,7 +119,7 @@ fn is_metavariable(element: SyntaxElement) -> Option<TextRange> { | |||
119 | let tok = element.as_token()?; | 119 | let tok = element.as_token()?; |
120 | match tok.kind() { | 120 | match tok.kind() { |
121 | kind if kind == SyntaxKind::IDENT || kind.is_keyword() => { | 121 | kind if kind == SyntaxKind::IDENT || kind.is_keyword() => { |
122 | if let Some(_dollar) = tok.prev_token().filter(|t| t.kind() == SyntaxKind::DOLLAR) { | 122 | if let Some(_dollar) = tok.prev_token().filter(|t| t.kind() == T![$]) { |
123 | return Some(tok.text_range()); | 123 | return Some(tok.text_range()); |
124 | } | 124 | } |
125 | } | 125 | } |