; expect: run ; result: 42 ; phase: 1 ; spec: docs/spec/07a-air-instructions.md; docs/spec/15-source-language.md ยง5 ; Independent format-0 baseline: temporary borrows end before the next access. module test.array_arguments air 0 lang 0.1 features [arrays, effects, ownership] fn @first(%a: ref>) -> u64 effects [] entry: %index = const.usize 0 %element = borrow.index %a, %index %value = load %element borrow.end %element ret %value fn @set(%a: mut>) -> void effects [] entry: %answer = const.u64 42 %index = const.usize 0 %element = borrow.index %a, %index store %element, %answer borrow.end %element ret fn @main() -> u64 effects [] entry: %data = local.alloc array local.zero %data %writer = borrow.mut %data call @set(%writer) borrow.end %writer %reader = borrow.ref %data %answer = call @first(%reader) borrow.end %reader local.zero %data ret %answer