Expand description
Native ownership analysis for use-after-move detection.
Lightweight data-flow analysis that catches the 90% common ownership errors
at check-time (milliseconds), before Rust compilation. This pass tracks
Owned, Moved, and Borrowed states through control flow.
§State Transitions
Let x be value
│
▼
[Owned]
/ \
Give x Show x
│ │
▼ ▼
[Moved] [Borrowed]
│ │
use x? use x? ✓
│
ERROR: use-after-move§Control Flow Awareness
The checker handles branches by merging states:
Movedin one branch +Ownedin other =MaybeMoved- Using a
MaybeMovedvariable produces an error
§Example
Let x be 5.
Give x to y.
Show x to show. ← Error: Cannot use 'x' after giving it awayStructs§
- Ownership
Checker - Ownership checker - tracks variable states through control flow
- Ownership
Error - Error type for ownership violations
Enums§
- Ownership
Error Kind - VarState
- Ownership state for a variable