-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Separate trait items from trait #37712
Comments
Marking this as E-mentor. I'll give a short write-up here; happy to provide a more detailed one too upon request! The work that needs to be done is basically to model trait items on impl items -- we would get a |
Apologies to anyone who wanted to pick this up, but I was blocked on it so I did it, PR coming soon. |
[10/n] Split constants and functions' arguments into disjoint bodies. _This is part of a series ([prev](#38053) | [next]()) of patches designed to rework rustc into an out-of-order on-demand pipeline model for both better feature support (e.g. [MIR-based](https://github.com/solson/miri) early constant evaluation) and incremental execution of compiler passes (e.g. type-checking), with beneficial consequences to IDE support as well. If any motivation is unclear, please ask for additional PR description clarifications or code comments._ <hr> Finishes the signature-body split started in #37918, namely: * `trait` items are separated just like `impl` items were, for uniformity, closing #37712 * `static`s, `const`s (including associated ones), `enum` discriminants and array lengths get bodies * even the count in "repeat expressions", i.e. `n` in `[x; n]`, which fixes #24414 * arguments' patterns are moved to the bodies, with the types staying in `FnDecl` * `&self` now desugars to `self: &Self` instead of `self: &_` (similarly for other `self` forms) * `astconv`'s and metadata's (for rustdoc) informative uses are explicitly ignored for the purposes of the dep graph. this could be fixed in the future by hashing the exact information being extracted about the arguments as opposed to generating a dependency on *the whole body*
Somehow the merge of #38449 didn't close this. |
PR #37660 separates impl items from impls in the HIR for improved interaction with incremental compilation. It probably makes sense to separate trait items from traits too -- not so much for improved incremental compilation precision, as because it makes the layout more analogous.
The text was updated successfully, but these errors were encountered: