mirror of
https://github.com/allankoechke/rust.git
synced 2026-11-30 11:05:36 +00:00
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.