//! Slice reserve lowers its allocation result with the layout of a pointer payload. This IL
//! snapshot covers one call.

/// 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 {}

/// Reserve room for four elements in `s`.
unsafe fn reserveSmall(owned: *mut [u32], a: &Heap) {
    let mut s = owned;
    try! s.reserve(4, a);
}

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