2021-10-06 15:53:11 +00:00
|
|
|
- // MIR for `array_len` before NormalizeArrayLen
|
|
|
|
+ // MIR for `array_len` after NormalizeArrayLen
|
|
|
|
|
|
|
|
fn array_len(_1: &[u8; N]) -> usize {
|
2023-06-06 13:47:00 +00:00
|
|
|
debug arr => _1;
|
|
|
|
let mut _0: usize;
|
|
|
|
let mut _2: &[u8];
|
|
|
|
let mut _3: &[u8; N];
|
2021-10-06 15:53:11 +00:00
|
|
|
|
|
|
|
bb0: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageLive(_2);
|
|
|
|
StorageLive(_3);
|
|
|
|
_3 = &(*_1);
|
2023-07-05 18:07:03 +00:00
|
|
|
_2 = move _3 as &[u8] (PointerCoercion(Unsize));
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_3);
|
|
|
|
- _0 = Len((*_2));
|
|
|
|
+ _0 = const N;
|
|
|
|
goto -> bb1;
|
2021-10-06 15:53:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2023-06-06 13:47:00 +00:00
|
|
|
StorageDead(_2);
|
|
|
|
return;
|
2021-10-06 15:53:11 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|