diff options
| author | Michael Goulet <michael@errs.io> | 2025-06-26 17:53:01 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-06-26 18:11:14 +0000 |
| commit | 94e9973b92c481d20e5fe1466bbc47f818101d5f (patch) | |
| tree | 6409f4ad35c6c2b6ed935e79abb3753965bb1e66 /compiler/rustc_ast/src/tokenstream.rs | |
| parent | 3b9d04c62f74b9be46c3ba56cf8393529aa81d26 (diff) | |
| download | rust-94e9973b92c481d20e5fe1466bbc47f818101d5f.tar.gz rust-94e9973b92c481d20e5fe1466bbc47f818101d5f.zip | |
Add Ident::is_non_reserved_ident
Diffstat (limited to 'compiler/rustc_ast/src/tokenstream.rs')
| -rw-r--r-- | compiler/rustc_ast/src/tokenstream.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/compiler/rustc_ast/src/tokenstream.rs b/compiler/rustc_ast/src/tokenstream.rs index 3c231be20dc..c60185cdde0 100644 --- a/compiler/rustc_ast/src/tokenstream.rs +++ b/compiler/rustc_ast/src/tokenstream.rs @@ -634,10 +634,8 @@ impl TokenStream { ( TokenTree::Token(token_left, Spacing::Alone), TokenTree::Token(token_right, _), - ) if ((token_left.is_ident() && !token_left.is_reserved_ident()) - || token_left.is_lit()) - && ((token_right.is_ident() && !token_right.is_reserved_ident()) - || token_right.is_lit()) => + ) if (token_left.is_non_reserved_ident() || token_left.is_lit()) + && (token_right.is_non_reserved_ident() || token_right.is_lit()) => { token_left.span } |
