]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/repeat-trusted-len.rs
use jemallocator in rustc/rustdoc
[rust.git] / src / test / codegen / repeat-trusted-len.rs
1 // compile-flags: -O
2 // ignore-tidy-linelength
3
4 #![crate_type = "lib"]
5
6 use std::iter;
7
8 // CHECK-LABEL: @repeat_take_collect
9 #[no_mangle]
10 pub fn repeat_take_collect() -> Vec<u8> {
11 // CHECK: call void @llvm.memset.p0i8.i{{[0-9]+}}(i8* {{(nonnull )?}}align 1{{.*}} %{{[0-9]+}}, i8 42, i{{[0-9]+}} 100000, i1 false)
12     iter::repeat(42).take(100000).collect()
13 }