Annotate needs-unwind.

This commit is contained in:
Camille GILLOT 2023-05-17 20:26:11 +00:00
parent 051dd6714c
commit 36cae3a3a2
9 changed files with 19 additions and 17 deletions

View File

@ -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

View File

@ -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

View File

@ -1,4 +1,5 @@
// compile-flags: -O -Zmir-opt-level=2 -Cdebuginfo=2
// needs-unwind
// ignore-debug
#![crate_type = "lib"]

View File

@ -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

View File

@ -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>) }
}

View File

@ -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>) }
}

View File

@ -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>) }
}

View File

@ -1,4 +1,5 @@
// compile-flags: -O -Zmir-opt-level=2 -g
// needs-unwind
// ignore-debug
#![crate_type = "lib"]

View File

@ -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>) }
}