1 // min-llvm-version: 15.0.0
2 // ignore-debug: The debug assertions get in the way
7 // There should be no calls to panic / len_mismatch_fail.
10 pub fn test(a: &mut [u8], offset: usize, bytes: &[u8]) {
11 // CHECK-LABEL: @test(
13 // CHECK: call void @llvm.memcpy
16 if let Some(dst) = a.get_mut(offset..offset + bytes.len()) {
17 dst.copy_from_slice(bytes);