omega-mv
Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance.
Brought by drakestapleton
omega-mv / tests / compiler / neg / ma_move_in_loop_while_borrowed.osc
| 1 | // expect: MUTABLE_ALIAS object=a line=7 |
| 2 | // transition: move while borrowed |
| 3 | fn consume(value: own [u8; 2]) -> u8 { return value[0]; } |
| 4 | fn f() -> u8 { |
| 5 | let a: own [u8; 2] = alloc(3); |
| 6 | let r: &[u8; 2] = &a; |
| 7 | for i in 0 .. 3 { let x: u8 = consume(a); } |
| 8 | return r[0]; |
| 9 | } |