Skip to content

Track drop points by MIR Place#154

Closed
coord-e wants to merge 1 commit into
mainfrom
codex/fix-droppoints-to-track-place
Closed

Track drop points by MIR Place#154
coord-e wants to merge 1 commit into
mainfrom
codex/fix-droppoints-to-track-place

Conversation

@coord-e

@coord-e coord-e commented Jun 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • Replace the previous ad-hoc Local-only drop-point representation with MIR Place so implicit drops are tracked at the correct place granularity.
  • This ensures correct restoration of drop obligations for moved closure environments and removes brittle projection-less-local workarounds.

Description

  • Change DropPoints to store mir::Place<'tcx> in before_statements, after_statements, after_terminator, and after_terminator_extra, and make DropPoints generic over the MIR lifetime.
  • Convert liveness-derived Local sets into mir::Place<'tcx> in DropPointsBuilder::build and adapt APIs to insert/remove/query places.
  • Update the basic-block Analyzer to use DropPoints<'tcx>, add drop_place/drop_after_terminator operations, and route all implicit-drop handling to work with mir::Place<'tcx> across statements and terminators.
  • Add drop_place to the refinement Env and make drop_local delegate to it, and update local_def and RustCallVisitor to produce/consume places (including restoring closure environment-drop obligations at the precise place).

Testing

  • Ran cargo check, which completed successfully.
  • Ran cargo fmt and git diff --check, which reported no issues.
  • Ran cargo test (UI test suite), which failed due to environment limitations (missing external verifier/solver and docker usage in wrappers), causing many UI tests to fail; failures are due to the test environment, not obviously due to this change.

Codex Task

@coord-e

coord-e commented Jun 28, 2026

Copy link
Copy Markdown
Owner Author

Superseded by #155, which builds on this branch's Place-based DropPoints and adds the actual #121/#122 fix (splitting partially-moved locals into their still-owned sub-places in the drop-point production) plus regression tests. Verified that this branch alone did not reject the false-assertion cases; #155 does, with the full UI suite green. Closing in favor of #155.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant