generator_interior should be refactored to use ExprUseVisitor #94463
Labels
A-async-await
Area: Async & Await
A-technical-debt
Area: Internal cleanup work
AsyncAwait-Triaged
Async-await issues that have been triaged during a working group meeting.
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
With the introduction of generator drop tracking, we essentially have two generator interior type analyses: the previous scope tree based analysis and the new drop tracking analysis. The two analyses cover different aspects of generator interior analysis, but having two of them makes the code complicated, adds weird edge cases and heuristics, and comes at a performance cost.
It should be possible to rewrite the entire generator interior analysis to be based around
ExprUseVisitor
. This should simplify the code, improve performance, make generator interiors more consistent with the rest of Rust, and make it easier to be still more precise in the analysis.The text was updated successfully, but these errors were encountered: