rust/compiler/rustc_parse/src
bors 5ce96b1d0f Auto merge of #124779 - workingjubilee:debug-formatting-my-beloved, r=compiler-errors
Improve `rustc_parse::Parser`'s debuggability

The main event is the final commit where I add `Parser::debug_lookahead`. Everything else was basically cleaning up things that bugged me (debugging, as it were) until I felt comfortable enough to actually work on it.

The motivation is that it's annoying as hell to try to figure out how the debug infra works in rustc without having basic queries like `debug!(?parser);` come up "empty". However, Parser has a lot of fields that are mostly irrelevant for most debugging, like the entire ParseSess. I think `Parser::debug_lookahead` with a capped lookahead might be fine as a general-purpose Debug impl, but this adapter version was suggested to allow more choice, and admittedly, it's a refined version of what I was already handrolling just to get some insight going.
2024-05-08 05:11:18 +00:00
..
lexer narrow down visibilities in rustc_parse::lexer 2024-05-07 11:02:28 +08:00
parser Auto merge of #124779 - workingjubilee:debug-formatting-my-beloved, r=compiler-errors 2024-05-08 05:11:18 +00:00
errors.rs Rollup merge of #124218 - Xiretza:subsubdiagnostics, r=davidtwco 2024-04-23 17:25:17 +02:00
lib.rs compiler: add Parser::debug_lookahead 2024-05-07 19:10:29 -07:00
validate_attr.rs Rename all ParseSess variables/fields/lifetimes as psess. 2024-03-05 08:11:45 +11:00