Files
rust/compiler
bors 6b410a8387 Auto merge of #162269 - fmease:parser-cleanups, r=petrochenkov
Clean up various things in the parser



I urge you to review this PR commit by commit. Note that almost every single commit comes with a rather elaborate commit message. Well, excuse the probably questionable grammar & structure of some of these commit messages, I was a bit tired while writing them; I'll go over them again some other day to revise them.

What does this PR  actually do?

1. removes parse error recovery code that's already obsolete / unreachable or that's rendered that way by other changes in this PR
2. simplifies, generalizes & consolidates the parse error recovery code for outer attributes in invalid contexts[^1]
3. adds comments explaining some non-obvious parts of bare trait object type parsing

<sub>(No LLM was or will be used by me during the entire creation process of this PR)</sub>

[^1]: It doesn't consolidate all of them. I've left alone the one for `if` & `else` branches and the one for use-trees. Those offer slightly more complex recovery. I might revisit this in the future.
2026-09-08 00:45:23 +00:00
..
2026-09-04 16:50:41 +02:00