diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2023-05-17 20:26:11 +0000 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2023-06-01 21:41:58 +0000 |
| commit | 36cae3a3a2291ececa4600727e2e170d113fe1b6 (patch) | |
| tree | 7d704e7828859f918bf26000b56ef02b0ce205a8 | |
| parent | 051dd6714cde780c4642bf51d27b0023487002a1 (diff) | |
| download | rust-36cae3a3a2291ececa4600727e2e170d113fe1b6.tar.gz rust-36cae3a3a2291ececa4600727e2e170d113fe1b6.zip | |
Annotate needs-unwind.
9 files changed, 19 insertions, 17 deletions
diff --git a/tests/mir-opt/pre-codegen/checked_ops.checked_shl.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/checked_ops.checked_shl.PreCodegen.after.mir index 75c4c56dd67..4dea3b3da52 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.checked_shl.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/checked_ops.checked_shl.PreCodegen.after.mir @@ -4,7 +4,7 @@ fn checked_shl(_1: u32, _2: u32) -> Option<u32> { debug x => _1; // in scope 0 at $DIR/checked_ops.rs:+0:20: +0:21 debug rhs => _2; // in scope 0 at $DIR/checked_ops.rs:+0:28: +0:31 let mut _0: std::option::Option<u32>; // return place in scope 0 at $DIR/checked_ops.rs:+0:41: +0:52 - scope 1 (inlined core::num::<impl u32>::checked_shl) { // at $DIR/checked_ops.rs:14:7: 14:23 + scope 1 (inlined core::num::<impl u32>::checked_shl) { // at $DIR/checked_ops.rs:15:7: 15:23 debug self => _1; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL debug rhs => _2; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL let mut _13: (u32, bool); // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL diff --git a/tests/mir-opt/pre-codegen/checked_ops.ilog2.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/checked_ops.ilog2.PreCodegen.after.mir index fc7626cce17..b0a16e923b8 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.ilog2.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/checked_ops.ilog2.PreCodegen.after.mir @@ -3,7 +3,7 @@ fn ilog2(_1: u32) -> u32 { debug x => _1; // in scope 0 at $DIR/checked_ops.rs:+0:14: +0:15 let mut _0: u32; // return place in scope 0 at $DIR/checked_ops.rs:+0:25: +0:28 - scope 1 (inlined #[track_caller] core::num::<impl u32>::ilog2) { // at $DIR/checked_ops.rs:19:7: 19:14 + scope 1 (inlined #[track_caller] core::num::<impl u32>::ilog2) { // at $DIR/checked_ops.rs:20:7: 20:14 debug self => _1; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL let mut _2: std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL let mut _3: isize; // in scope 1 at $SRC_DIR/core/src/num/uint_macros.rs:LL:COL diff --git a/tests/mir-opt/pre-codegen/checked_ops.rs b/tests/mir-opt/pre-codegen/checked_ops.rs index 5a751362c09..0e6c9596efa 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.rs +++ b/tests/mir-opt/pre-codegen/checked_ops.rs @@ -1,4 +1,5 @@ // compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2 +// needs-unwind // ignore-debug #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.mir index d61aac7d73b..dead767d20e 100644 --- a/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/checked_ops.step_forward.PreCodegen.after.mir @@ -4,7 +4,7 @@ fn step_forward(_1: u32, _2: usize) -> u32 { debug x => _1; // in scope 0 at $DIR/checked_ops.rs:+0:21: +0:22 debug n => _2; // in scope 0 at $DIR/checked_ops.rs:+0:29: +0:30 let mut _0: u32; // return place in scope 0 at $DIR/checked_ops.rs:+0:42: +0:45 - scope 1 (inlined <u32 as Step>::forward) { // at $DIR/checked_ops.rs:9:5: 9:35 + scope 1 (inlined <u32 as Step>::forward) { // at $DIR/checked_ops.rs:10:5: 10:35 debug start => _1; // in scope 1 at $SRC_DIR/core/src/iter/range.rs:LL:COL debug n => _2; // in scope 1 at $SRC_DIR/core/src/iter/range.rs:LL:COL let _3: std::option::Option<u32>; // in scope 1 at $SRC_DIR/core/src/iter/range.rs:LL:COL diff --git a/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir index ab07b053536..dce9feddfc5 100644 --- a/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/loops.filter_mapped.PreCodegen.after.mir @@ -17,13 +17,13 @@ fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> () scope 2 { debug x => _11; // in scope 2 at $DIR/loops.rs:+1:9: +1:10 } - scope 4 (inlined <FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> as Iterator>::next) { // at $DIR/loops.rs:19:14: 19:32 + scope 4 (inlined <FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> as Iterator>::next) { // at $DIR/loops.rs:20:14: 20:32 debug self => _6; // in scope 4 at $SRC_DIR/core/src/iter/adapters/filter_map.rs:LL:COL let mut _7: &mut impl Iterator<Item = T>; // in scope 4 at $SRC_DIR/core/src/iter/adapters/filter_map.rs:LL:COL let mut _8: &mut impl Fn(T) -> Option<U>; // in scope 4 at $SRC_DIR/core/src/iter/adapters/filter_map.rs:LL:COL } } - scope 3 (inlined <FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> as IntoIterator>::into_iter) { // at $DIR/loops.rs:19:14: 19:32 + scope 3 (inlined <FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> as IntoIterator>::into_iter) { // at $DIR/loops.rs:20:14: 20:32 debug self => _3; // in scope 3 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL } @@ -32,7 +32,7 @@ fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> () StorageLive(_3); // scope 0 at $DIR/loops.rs:+1:14: +1:32 _3 = <impl Iterator<Item = T> as Iterator>::filter_map::<U, impl Fn(T) -> Option<U>>(move _1, move _2) -> bb1; // scope 0 at $DIR/loops.rs:+1:14: +1:32 // mir::Constant - // + span: $DIR/loops.rs:19:19: 19:29 + // + span: $DIR/loops.rs:20:19: 20:29 // + literal: Const { ty: fn(impl Iterator<Item = T>, impl Fn(T) -> Option<U>) -> FilterMap<impl Iterator<Item = T>, impl Fn(T) -> Option<U>> {<impl Iterator<Item = T> as Iterator>::filter_map::<U, impl Fn(T) -> Option<U>>}, val: Value(<ZST>) } } @@ -79,7 +79,7 @@ fn filter_mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> Option<U>) -> () _11 = move ((_9 as Some).0: U); // scope 1 at $DIR/loops.rs:+1:9: +1:10 _12 = opaque::<U>(move _11) -> [return: bb7, unwind: bb9]; // scope 2 at $DIR/loops.rs:+2:9: +2:18 // mir::Constant - // + span: $DIR/loops.rs:20:9: 20:15 + // + span: $DIR/loops.rs:21:9: 21:15 // + literal: Const { ty: fn(U) {opaque::<U>}, val: Value(<ZST>) } } diff --git a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir index 78e5502f39d..12245ccf000 100644 --- a/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/loops.int_range.PreCodegen.after.mir @@ -16,11 +16,11 @@ fn int_range(_1: usize, _2: usize) -> () { scope 2 { debug i => _8; // in scope 2 at $DIR/loops.rs:+1:9: +1:10 } - scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) { // at $DIR/loops.rs:7:14: 7:24 + scope 4 (inlined iter::range::<impl Iterator for std::ops::Range<usize>>::next) { // at $DIR/loops.rs:8:14: 8:24 debug self => _5; // in scope 4 at $SRC_DIR/core/src/iter/range.rs:LL:COL } } - scope 3 (inlined <std::ops::Range<usize> as IntoIterator>::into_iter) { // at $DIR/loops.rs:7:14: 7:24 + scope 3 (inlined <std::ops::Range<usize> as IntoIterator>::into_iter) { // at $DIR/loops.rs:8:14: 8:24 debug self => _3; // in scope 3 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL } @@ -55,7 +55,7 @@ fn int_range(_1: usize, _2: usize) -> () { _8 = ((_6 as Some).0: usize); // scope 1 at $DIR/loops.rs:+1:9: +1:10 _9 = opaque::<usize>(_8) -> bb5; // scope 2 at $DIR/loops.rs:+2:9: +2:18 // mir::Constant - // + span: $DIR/loops.rs:8:9: 8:15 + // + span: $DIR/loops.rs:9:9: 9:15 // + literal: Const { ty: fn(usize) {opaque::<usize>}, val: Value(<ZST>) } } diff --git a/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir index 93a34e1ebde..bf1380b30ff 100644 --- a/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/loops.mapped.PreCodegen.after.mir @@ -18,7 +18,7 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () { debug x => _9; // in scope 2 at $DIR/loops.rs:+1:9: +1:10 } } - scope 3 (inlined <Map<impl Iterator<Item = T>, impl Fn(T) -> U> as IntoIterator>::into_iter) { // at $DIR/loops.rs:13:14: 13:25 + scope 3 (inlined <Map<impl Iterator<Item = T>, impl Fn(T) -> U> as IntoIterator>::into_iter) { // at $DIR/loops.rs:14:14: 14:25 debug self => _3; // in scope 3 at $SRC_DIR/core/src/iter/traits/collect.rs:LL:COL } @@ -27,7 +27,7 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () { StorageLive(_3); // scope 0 at $DIR/loops.rs:+1:14: +1:25 _3 = <impl Iterator<Item = T> as Iterator>::map::<U, impl Fn(T) -> U>(move _1, move _2) -> bb1; // scope 0 at $DIR/loops.rs:+1:14: +1:25 // mir::Constant - // + span: $DIR/loops.rs:13:19: 13:22 + // + span: $DIR/loops.rs:14:19: 14:22 // + literal: Const { ty: fn(impl Iterator<Item = T>, impl Fn(T) -> U) -> Map<impl Iterator<Item = T>, impl Fn(T) -> U> {<impl Iterator<Item = T> as Iterator>::map::<U, impl Fn(T) -> U>}, val: Value(<ZST>) } } @@ -44,7 +44,7 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () { _6 = &mut _5; // scope 1 at $DIR/loops.rs:+1:14: +1:25 _7 = <Map<impl Iterator<Item = T>, impl Fn(T) -> U> as Iterator>::next(_6) -> [return: bb3, unwind: bb9]; // scope 1 at $DIR/loops.rs:+1:14: +1:25 // mir::Constant - // + span: $DIR/loops.rs:13:14: 13:25 + // + span: $DIR/loops.rs:14:14: 14:25 // + literal: Const { ty: for<'a> fn(&'a mut Map<impl Iterator<Item = T>, impl Fn(T) -> U>) -> Option<<Map<impl Iterator<Item = T>, impl Fn(T) -> U> as Iterator>::Item> {<Map<impl Iterator<Item = T>, impl Fn(T) -> U> as Iterator>::next}, val: Value(<ZST>) } } @@ -68,7 +68,7 @@ fn mapped(_1: impl Iterator<Item = T>, _2: impl Fn(T) -> U) -> () { _9 = move ((_7 as Some).0: U); // scope 1 at $DIR/loops.rs:+1:9: +1:10 _10 = opaque::<U>(move _9) -> [return: bb7, unwind: bb9]; // scope 2 at $DIR/loops.rs:+2:9: +2:18 // mir::Constant - // + span: $DIR/loops.rs:14:9: 14:15 + // + span: $DIR/loops.rs:15:9: 15:15 // + literal: Const { ty: fn(U) {opaque::<U>}, val: Value(<ZST>) } } diff --git a/tests/mir-opt/pre-codegen/loops.rs b/tests/mir-opt/pre-codegen/loops.rs index 605cf9a324d..67f549a511c 100644 --- a/tests/mir-opt/pre-codegen/loops.rs +++ b/tests/mir-opt/pre-codegen/loops.rs @@ -1,4 +1,5 @@ // compile-flags: -O -Zmir-opt-level=2 -g +// needs-unwind // ignore-debug #![crate_type = "lib"] diff --git a/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir b/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir index db2bf3be7d0..6cd5a66de00 100644 --- a/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir +++ b/tests/mir-opt/pre-codegen/loops.vec_move.PreCodegen.after.mir @@ -21,7 +21,7 @@ fn vec_move(_1: Vec<impl Sized>) -> () { StorageLive(_2); // scope 0 at $DIR/loops.rs:+1:14: +1:15 _2 = <Vec<impl Sized> as IntoIterator>::into_iter(move _1) -> bb1; // scope 0 at $DIR/loops.rs:+1:14: +1:15 // mir::Constant - // + span: $DIR/loops.rs:25:14: 25:15 + // + span: $DIR/loops.rs:26:14: 26:15 // + literal: Const { ty: fn(Vec<impl Sized>) -> <Vec<impl Sized> as IntoIterator>::IntoIter {<Vec<impl Sized> as IntoIterator>::into_iter}, val: Value(<ZST>) } } @@ -36,7 +36,7 @@ fn vec_move(_1: Vec<impl Sized>) -> () { _4 = &mut _3; // scope 1 at $DIR/loops.rs:+1:14: +1:15 _5 = <std::vec::IntoIter<impl Sized> as Iterator>::next(_4) -> [return: bb3, unwind: bb9]; // scope 1 at $DIR/loops.rs:+1:14: +1:15 // mir::Constant - // + span: $DIR/loops.rs:25:14: 25:15 + // + span: $DIR/loops.rs:26:14: 26:15 // + literal: Const { ty: for<'a> fn(&'a mut std::vec::IntoIter<impl Sized>) -> Option<<std::vec::IntoIter<impl Sized> as Iterator>::Item> {<std::vec::IntoIter<impl Sized> as Iterator>::next}, val: Value(<ZST>) } } @@ -60,7 +60,7 @@ fn vec_move(_1: Vec<impl Sized>) -> () { _7 = move ((_5 as Some).0: impl Sized); // scope 1 at $DIR/loops.rs:+1:9: +1:10 _8 = opaque::<impl Sized>(move _7) -> [return: bb7, unwind: bb9]; // scope 2 at $DIR/loops.rs:+2:9: +2:18 // mir::Constant - // + span: $DIR/loops.rs:26:9: 26:15 + // + span: $DIR/loops.rs:27:9: 27:15 // + literal: Const { ty: fn(impl Sized) {opaque::<impl Sized>}, val: Value(<ZST>) } } |
