diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2024-05-31 00:22:40 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2024-05-31 00:22:40 +0000 |
| commit | e110567dcdf7b77cda5f3413af7c6fadec899a9a (patch) | |
| tree | ed5bf922b88a749176f85ccdaebc6a941db456f1 /tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir | |
| parent | 434999efe6e9aa61afbd8b4ae86864d3ce91c533 (diff) | |
| download | rust-e110567dcdf7b77cda5f3413af7c6fadec899a9a.tar.gz rust-e110567dcdf7b77cda5f3413af7c6fadec899a9a.zip | |
Revert "Auto merge of #115105 - cjgillot:dest-prop-default, r=oli-obk"
This reverts commit cfb730450f847bb622243eaaab15e77e58d91767, reversing changes made to 91c0823ee63e793d990bb9fed898dc95b5d6db51.
Diffstat (limited to 'tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir')
| -rw-r--r-- | tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir | 56 |
1 files changed, 31 insertions, 25 deletions
diff --git a/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir b/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir index 751e14441d4..5b6441cfb3b 100644 --- a/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir +++ b/tests/mir-opt/pre-codegen/slice_iter.range_loop.PreCodegen.after.panic-unwind.mir @@ -6,27 +6,28 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () { let mut _0: (); let mut _3: usize; let mut _4: usize; - let mut _8: std::option::Option<usize>; - let mut _10: usize; - let mut _11: bool; - let mut _13: &impl Fn(usize, &T); - let mut _14: (usize, &T); - let _15: (); + let mut _9: std::option::Option<usize>; + let mut _11: usize; + let mut _12: bool; + let mut _14: &impl Fn(usize, &T); + let mut _15: (usize, &T); + let _16: (); scope 1 { debug ((iter: std::ops::Range<usize>).0: usize) => _4; debug ((iter: std::ops::Range<usize>).1: usize) => _3; - let _9: usize; + let _10: usize; scope 2 { - debug i => _9; - let _12: &T; + debug i => _10; + let _13: &T; scope 3 { - debug x => _12; + debug x => _13; } } scope 5 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) { scope 6 (inlined <std::ops::Range<usize> as iter::range::RangeIteratorImpl>::spec_next) { let mut _6: bool; let _7: usize; + let mut _8: usize; scope 7 { } scope 8 (inlined std::cmp::impls::<impl PartialOrd for usize>::lt) { @@ -40,12 +41,13 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () { bb0: { _3 = Len((*_1)); + StorageLive(_4); _4 = const 0_usize; goto -> bb1; } bb1: { - StorageLive(_8); + StorageLive(_9); StorageLive(_7); StorageLive(_6); StorageLive(_5); @@ -58,7 +60,8 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () { bb2: { StorageDead(_6); StorageDead(_7); - StorageDead(_8); + StorageDead(_9); + StorageDead(_4); drop(_2) -> [return: bb3, unwind continue]; } @@ -68,32 +71,35 @@ fn range_loop(_1: &[T], _2: impl Fn(usize, &T)) -> () { bb4: { _7 = _4; - _4 = <usize as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb5, unwind: bb8]; + StorageLive(_8); + _8 = <usize as Step>::forward_unchecked(_7, const 1_usize) -> [return: bb5, unwind: bb8]; } bb5: { - _8 = Option::<usize>::Some(_7); + _4 = move _8; + StorageDead(_8); + _9 = Option::<usize>::Some(_7); StorageDead(_6); StorageDead(_7); - _9 = ((_8 as Some).0: usize); - _10 = Len((*_1)); - _11 = Lt(_9, _10); - assert(move _11, "index out of bounds: the length is {} but the index is {}", move _10, _9) -> [success: bb6, unwind: bb8]; + _10 = ((_9 as Some).0: usize); + _11 = Len((*_1)); + _12 = Lt(_10, _11); + assert(move _12, "index out of bounds: the length is {} but the index is {}", move _11, _10) -> [success: bb6, unwind: bb8]; } bb6: { - _12 = &(*_1)[_9]; - StorageLive(_13); - _13 = &_2; + _13 = &(*_1)[_10]; StorageLive(_14); - _14 = (_9, _12); - _15 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _13, move _14) -> [return: bb7, unwind: bb8]; + _14 = &_2; + StorageLive(_15); + _15 = (_10, _13); + _16 = <impl Fn(usize, &T) as Fn<(usize, &T)>>::call(move _14, move _15) -> [return: bb7, unwind: bb8]; } bb7: { + StorageDead(_15); StorageDead(_14); - StorageDead(_13); - StorageDead(_8); + StorageDead(_9); goto -> bb1; } |
