rust/compiler/rustc_parse
Nicholas Nethercote df56c50cee Make TokenType::from_u32 foolproof.
Currently it relies on having the right integer for every variant, and
if you add a variant you need to adjust the integers for all subsequent
variants, which is a pain.

This commit introduces a match guard formulation that takes advantage of
the enum-to-integer conversion to avoid specifying the integer for each
variant. And it does this via a macro to avoid lots of boilerplate.
2024-12-19 16:05:41 +11:00
..
src Make TokenType::from_u32 foolproof. 2024-12-19 16:05:41 +11:00
Cargo.toml Update unicode-width to 0.2.0 2024-10-12 21:57:50 +00:00
messages.ftl Introduce default_field_values feature 2024-12-09 21:55:01 +00:00