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#113218 - lqd:polonius-scopes, r=<try>
Compute NLL loan scopes using the polonius model Draft PR to guide discussion for this monday's types team meeting, where the plan is to read this and review as a group. For a *location-insensitive* analysis (that is, without expressiveness improvements for users yet), this PR implements loans going out of scope using reachability and liveness, rather than checking if the issuing region's values contain a given CFG point. This is equivalent to NLL scopes and computes the same data. There are a few fixmes left, and I'll still work on them before the meeting. A couple of notes: - I started prototyping this a while ago so it follows the structure of the _previous_ NLL `OutOfScopePrecomputer`, before the couple recent refactors. They probably could/should look the same instead. - there are some assumptions about placeholders, free regions, and member constraints that I think hold, and they're documented in the code - this passes all the UI tests with `-Zpolonius=next` -- though the additional work done can be felt on the huge numeric/float tests, but the perf is [not terrible](rust-lang#112432 (comment)) and there are a bunch of ways to improve it in the future. (cc `@matthewjasper` since you asked to be pinged about it) r? `@ghost`
- Loading branch information
Showing
10 changed files
with
413 additions
and
37 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
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.