- RFC 0005 Accepted (revision 2) - spec 07 §8.8 types and syntax; spec 07a contracts for features ownership and arrays; spec 08 §11-§14 borrows, facts, initialization, stage order; spec 03 frame storage, second-class borrows, static region generations - grammar: from-returns, multi-result, new types and opcodes - feature registry: ownership and arrays published; heap added and regions moved to Phase 2; borrow_joins reserved and unscheduled - codes E2105-E2108, T0008 - Q-009, Q-010 resolved; Phase 1 and Phase 2 plans updated; Own test moved to phase 2
17 lines
303 B
LLVM
17 lines
303 B
LLVM
; %p is moved into %q and then used again.
|
|
; expect: reject E2001
|
|
; phase: 2
|
|
; spec: docs/spec/03-memory-model.md
|
|
module test.use_after_move
|
|
air 0
|
|
lang 0.1
|
|
features [capabilities, effects, heap, ownership]
|
|
|
|
fn @f(%p: Own<u64>) -> Own<u64>
|
|
effects []
|
|
|
|
entry:
|
|
%q = move %p
|
|
%r = move %p
|
|
ret %r
|