forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#87234 - cjgillot:lower-mono, r=petrochenkov
Lower only one HIR owner at a time Based on rust-lang#83723 Additional diff is here: cjgillot/rust@ownernode...lower-mono Lowering is very tangled and has a tendency to intertwine the transformation of different items. This PR aims at simplifying the logic by: - moving global analyses to the resolver (item_generics_num_lifetimes, proc_macros, trait_impls); - removing a few special cases (non-exported macros and use statements); - restricting the amount of available information at any one time; - avoiding back-and-forth between different owners: an item must now be lowered all at once, and its parent cannot refer to its nodes. I also removed the sorting of bodies by span. The diagnostic ordering changes marginally, since definitions are pretty much sorted already according to the AST. This uncovered a subtlety in thir-unsafeck. (While these items could logically be in different PRs, the dependency between commits and the amount of conflicts force a monolithic PR.)
- Loading branch information
Showing
19 changed files
with
163 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.