mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
18 lines
355 B
Rust
18 lines
355 B
Rust
// Guards against regression for optimization discussed in issue #80836
|
|
|
|
//@ compile-flags: -O
|
|
//@ ignore-debug: the debug assertions get in the way
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
use std::collections::VecDeque;
|
|
|
|
// CHECK-LABEL: @front
|
|
// CHECK: ret void
|
|
#[no_mangle]
|
|
pub fn front(v: VecDeque<usize>) {
|
|
if !v.is_empty() {
|
|
v.get(0).unwrap();
|
|
}
|
|
}
|