]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-45466.rs
Rollup merge of #107769 - compiler-errors:pointer-like, r=eholk
[rust.git] / tests / codegen / issue-45466.rs
1 // compile-flags: -O
2 // ignore-debug: the debug assertions get in the way
3
4 #![crate_type="rlib"]
5
6 // CHECK-LABEL: @memzero
7 // CHECK-NOT: store
8 // CHECK: call void @llvm.memset
9 // CHECK-NOT: store
10 #[no_mangle]
11 pub fn memzero(data: &mut [u8]) {
12     for i in 0..data.len() {
13         data[i] = 0;
14     }
15 }