Merge TraitItem & ImplItem into AssocItem` by Centril · Pull Request #67131 · rust-lang/rust (original) (raw)

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request

@Dylan-DPC

…enkov

parse: merge fn syntax + cleanup item parsing

Here we continue the work in rust-lang#67131 in particular to merge the grammars of fn items in various positions.

A list of language level changes (as sanctioned by the language team in rust-lang#65041 (comment) and rust-lang#67131):

Put together, these grammar changes allow us to substantially reduce the complexity of item parsing and its grammar. There are however some other non-language improvements that allow the compression to take place.

A list of compiler-internal changes (in particular noting the parser-external data-structure changes):

I would recommend reviewing this commit-by-commit with whitespace changes hidden.

r? @estebank @petrochenkov