rust/compiler/rustc_parse/src/parser
Trevor Gross e2e0681e3a
Rollup merge of #127842 - nnethercote:rm-TrailingToken, r=petrochenkov
Remove `TrailingToken`.

It's used in `Parser::collect_tokens_trailing_token` to decide whether to capture a trailing token. But the callers actually know whether to capture a trailing token, so it's simpler for them to just pass in a bool.

Also, the `TrailingToken::Gt` case was weird, because it didn't result in a trailing token being captured. It could have been subsumed by the `TrailingToken::MaybeComma` case, and it effectively is in the new code.

r? `@petrochenkov`
2024-07-18 05:14:07 -05:00
..
mut_visit Specialize assert_pred. 2024-06-06 08:26:54 +10:00
tokenstream Move some tests from rustc_expand to rustc_parse. 2024-05-06 09:06:02 +10:00
attr.rs Simplify ReplaceRange. 2024-07-07 15:58:36 +10:00
attr_wrapper.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
diagnostics.rs More accurate span for anonymous argument suggestion 2024-07-18 00:19:27 +00:00
expr.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
generics.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
item.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
mod.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
nonterminal.rs Deny keyword lifetimes pre-expansion 2024-07-16 12:06:25 -04:00
pat.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
path.rs Use more accurate span for : to :: suggestion 2024-07-12 03:02:58 +00:00
stmt.rs Remove TrailingToken. 2024-07-18 17:28:49 +10:00
tests.rs Fix DebugParser. 2024-07-13 16:42:00 +10:00
ty.rs Deny keyword lifetimes pre-expansion 2024-07-16 12:06:25 -04:00