Expand description
Borrow analysis results — the single source of truth.
BorrowAnalysis is the shared result struct consumed by:
- The compiler (codegen decisions: move vs clone)
- The LSP (inlay hints, borrow windows, hover info)
- The diagnostic engine (error messages, repair suggestions)
DRY rule: Analysis runs ONCE. No consumer re-derives these results.
Structs§
- Borrow
Analysis - The complete borrow analysis for a single function. Produced by the Datafrog solver + liveness analysis. Consumed (read-only) by compiler, LSP, and diagnostics.
- Borrow
Error - A borrow conflict error with structured data for diagnostics. The diagnostic engine formats this; consumers never generate error text.
- Loan
Info - Information about a single loan (borrow).
- Mutability
Error - Error for writing to an immutable binding.
- Repair
Candidate - A repair candidate (fix suggestion) verified by re-running the solver.
- Repair
Diff - A concrete code change for a repair suggestion.
Enums§
- Borrow
Error Kind - Ownership
Decision - The ownership decision for an assignment of a non-Copy type.
- Repair
Kind