; A borrow returned with `from` reads storage of the caller. ; expect: run ; result: 5 ; phase: 1 ; spec: docs/spec/07a-air-instructions.md module test.borrow_from_call air 0 lang 0.1 features [arrays, ownership] fn @main() -> u8 effects [] entry: %x = local.alloc array %five = const.u8 5 %a = array.splat array %five local.store %x, %a %r = borrow.ref %x %s = slice.make %r %e = call @first(%s) %v = load %e borrow.end %e borrow.end %s borrow.end %r ret %v fn @first(%s: slice) -> ref from %s effects [] entry: %z = const.usize 0 %e = borrow.index %s, %z ret %e