blob: be2c4810ebc4434466db2781c611ee03147d2d6b [file] [log] [blame]
// This test checks that `VecDeque::front[_mut]()` and `VecDeque::back[_mut]()` can't panic.
//@ compile-flags: -O
//@ ignore-debug: plain old debug assertions
#![crate_type = "lib"]
use std::collections::VecDeque;
// CHECK-LABEL: @dont_panic
#[no_mangle]
pub fn dont_panic(v: &mut VecDeque<usize>) {
// CHECK-NOT: expect
// CHECK-NOT: panic
v.front();
v.front_mut();
v.back();
v.back_mut();
}