FileCheck lower_slice_len.
This commit is contained in:
parent
ad057d4397
commit
d24e44a07e
@ -1,9 +1,10 @@
|
||||
// skip-filecheck
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
// unit-test: LowerSliceLenCalls
|
||||
// EMIT_MIR_FOR_EACH_PANIC_STRATEGY
|
||||
|
||||
// EMIT_MIR lower_slice_len.bound.LowerSliceLenCalls.diff
|
||||
pub fn bound(index: usize, slice: &[u8]) -> u8 {
|
||||
// CHECK-LABEL: fn bound(
|
||||
// CHECK-NOT: ::len(
|
||||
if index < slice.len() {
|
||||
slice[index]
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user