Goal
Complete safe-reference lifetime enforcement without adding lifetime syntax.
Current Boundary
&T and &mut T types, expressions, receivers, interface views, and reborrows are implemented.
- Reference-containing aggregate storage remains rejected.
- Reference returns remain rejected until origin summaries exist.
- Obvious same-expression alias conflicts and owner-move-while-borrowed checks are not implemented yet.
Scope
- Track origins for explicit borrows, receiver auto-borrows, field projections, reborrows, and borrowed interface values.
- Summarize which reference parameters may supply a returned reference.
- Allow safe parameter-origin reference returns while rejecting local-origin escapes.
- Reject conflicting shared/mutable borrows where overlap is known.
- Prevent moving or consuming an owner while derived references remain live.
- Keep conservative rejection for unresolved aggregate/index overlap.
- Keep v1 free of user-written lifetime parameters.
Validation
- Focused ownership/typechecker tests for return origins, reborrows, alias conflicts, and owner moves.
- Positive and negative
x_test/ fixtures.
- HIR/MIR/backend smoke for accepted returned references.
- Full
go test ./... and git diff --check.
Goal
Complete safe-reference lifetime enforcement without adding lifetime syntax.
Current Boundary
&Tand&mut Ttypes, expressions, receivers, interface views, and reborrows are implemented.Scope
Validation
x_test/fixtures.go test ./...andgit diff --check.