]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/repeat-trusted-len.rs
Suggest defining type parameter when appropriate
[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: @helper([[USIZE:i[0-9]+]] %_1)
9 #[no_mangle]
10 pub fn helper(_: usize) {
11 }
12
13 // CHECK-LABEL: @repeat_take_collect
14 #[no_mangle]
15 pub fn repeat_take_collect() -> Vec<u8> {
16 // CHECK: call void @llvm.memset.p0i8.[[USIZE]](i8* {{(nonnull )?}}align 1{{.*}} %{{[0-9]+}}, i8 42, [[USIZE]] 100000, i1 false)
17     iter::repeat(42).take(100000).collect()
18 }