blob: 3166842afca0ee1ea5e3dac8f2030ec1dfe0d62f (
plain)
| 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 | // This test checks that `VecDeque::front[_mut]()` and `VecDeque::back[_mut]()` can't panic.
//@ compile-flags: -Copt-level=3
//@ ignore-std-debug-assertions (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();
}
 |