rust/compiler/rustc_parse/src
bors 62c068feea Auto merge of #127636 - nnethercote:fix-Parser-look_ahead, r=oli-obk
Fix `Parser::look_ahead`

`Parser::look_ahead` has a slow but simple general case, and a fast special case that is hit most of the time. But the special case is buggy and behaves differently to the general case. There are also no unit tests. This PR fixes all of this, resulting in a `Parser::look_ahead` that is equally fast, slightly simpler, more correct, and better tested.

r? `@davidtwco`
2024-07-12 17:28:21 +00:00
..
lexer Use a dedicated type instead of a reference for the diagnostic context 2024-06-18 15:42:11 +00:00
parser Auto merge of #127636 - nnethercote:fix-Parser-look_ahead, r=oli-obk 2024-07-12 17:28:21 +00:00
errors.rs Add suggestions for possible missing fn, struct, or enum keywords 2024-07-08 10:04:03 +04:00
lib.rs Prefer dcx methods over fields or fields' methods 2024-06-18 13:45:08 +00:00
validate_attr.rs coverage: Tighten validation of #[coverage(off)] and #[coverage(on)] 2024-06-24 20:15:01 +10:00