rust/compiler/rustc_parse/src
Matthias Krüger 6f0b237c72
Rollup merge of #128376 - compiler-errors:finish-ur-vegetables, r=jieyouxu
Mark `Parser::eat`/`check` methods as `#[must_use]`

These methods return a `bool`, but we probably should either use these values or explicitly throw them away (e.g. when we just want to unconditionally eat a token if it exists).

I changed a few places from `eat` to `expect`, but otherwise I tried to leave a comment explaining why the `eat` was okay.

This also adds a test for the `pattern_type!` macro, which used to silently accept a missing `is` token.
2024-07-30 22:51:38 +02:00
..
lexer Auto merge of #127955 - chenyukang:yukang-fix-mismatched-delimiter-issue-12786, r=nnethercote 2024-07-30 13:02:16 +00:00
parser Mark Parser::eat/check methods as must_use 2024-07-29 21:29:08 -04:00
errors.rs Auto merge of #128083 - Mark-Simulacrum:bump-bootstrap, r=albertlarsan68 2024-07-30 17:49:08 +00:00
lib.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00
validate_attr.rs Reformat use declarations. 2024-07-29 08:26:52 +10:00