rust/tests/codegen/vec-iter-collect-len.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
213 B
Rust
Raw Normal View History

//@ compile-flags: -O
#![crate_type = "lib"]
#[no_mangle]
pub fn get_len() -> usize {
// CHECK-LABEL: @get_len
// CHECK-NOT: call
// CHECK-NOT: invoke
[1, 2, 3].iter().collect::<Vec<_>>().len()
}