Skip to content

Stabilizable Polonius support on nightly #118

@nikomatsakis

Description

@nikomatsakis
Metadata
Point of contact @lqd
Team(s) types
Goal document 2025h2/polonius

Summary

Make a stabilizable version of the polonius next generation borrow checking "alpha" algorithm. This revision of the analysis, while less powerful than we hoped, currently scales better than the previous datalog implementation, and accepts the main problem case we deferred from NLLs: it handles almost all our in-tree tests, passes perf runs (but is still too slow) and crater runs without issues. It's therefore a worthwhile step to ship to users, but needs more work to be properly usable on nightly.

This goal is a continuation of the 2025h1 goal.

Tasks and status


Note: we have updated the body to match the 2025h2 goal. Your original text is preserved below.

Metadata
Point of contact @lqd
Team(s) types
Goal document 2025h1/Polonius

Summary

Keep working on implementing a native rustc version of the Polonius next generation borrow checking algorithm, that would scale better than the previous datalog implementation, continuing from the 2024h2 goal.

Tasks and status

  • Design review (@nikomatsakis)
  • Factoring out higher-ranked concerns from the main path (@amandasystems)
    • rewrite invalid universe constraints with outlives 'static constraints — PR #123720
    • completely remove placeholders — in progress, PR #130227
  • Replace parts of the borrow checker with location-insensitive Polonius
  • Location-sensitive prototype on nightly (@lqd)
    • create structures for location-dependent outlives constraints
    • build new constraint graph from typeck constraints and liveness constraints
    • update NLLs for required changes to local & region liveness, loan liveness & loan scopes, (possibly unreachable) kills, bidirectional traversal & active loans
    • land on nightly — PRs #134268, #134315, #134378, #134670, #134914, #134920, #134980 and #135290.
  • Debugging / dump tool for analysis of location-sensitive analysis (@lqd), PRs #136031, #136104 and #136278
  • Tests and validation of location-sensitive Polonius (@lqd) — in progress
    • limit regressions about diagnostics when using the new constraints on diagnostics tailored to the old constraints — PR #136299
    • make the full test suite pass — in progress
    • do a crater run for assertions and backwards-compatibility
    • expand test suite with tests about the new capabilities
  • Location-sensitive pass on nightly, tested on CI (@lqd)
  • Standard reviews (types Team): thanks to @jackh726 and @matthewjasper for the many reviews.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions