//! Slice resize and extend lower to a fill loop and word copy loops. This IL snapshot covers one
//! call of each.

/// The allocation error, which the compiler knows.
@language union AllocError: Copy {
    /// The heap is out of memory.
    OutOfMemory,
}

/// A heap, which holds elements of any type.
@language record Heap {}

/// The allocator view of a heap, which provides plain elements.
@language record Allocator {}

/// Resize `s` to four elements filled with seven.
unsafe fn fillSmall(owned: *mut [u32], a: &Heap) {
    let mut s = owned;
    try! s.resize(4, 7, a);
}

/// Append every element of `src` to `s`.
unsafe fn joinSmall(owned: *mut [u32], src: *[u32], a: &Heap) {
    let mut s = owned;
    try! s.extend(src, a);
}

@default unsafe fn main() -> i32 {
    return 0;
}
