2020-12-10 18:00:00 -06:00
|
|
|
- // MIR for `discriminant` before LowerIntrinsics
|
|
|
|
+ // MIR for `discriminant` after LowerIntrinsics
|
|
|
|
|
|
|
|
fn discriminant(_1: T) -> () {
|
2022-07-27 13:47:42 -05:00
|
|
|
debug t => _1; // in scope 0 at $DIR/lower_intrinsics.rs:+0:24: +0:25
|
|
|
|
let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:30: +0:30
|
|
|
|
let _2: <T as std::marker::DiscriminantKind>::Discriminant; // in scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
|
|
|
let mut _3: &T; // in scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
|
|
|
|
let _4: &T; // in scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
|
|
|
|
let _5: u8; // in scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
|
|
|
let mut _6: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
|
|
|
let _7: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
|
|
|
let _8: i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:43: +2:44
|
|
|
|
let _9: u8; // in scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
|
|
|
let mut _10: &(); // in scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
|
|
|
let _11: &(); // in scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
|
|
|
let _12: (); // in scope 0 at $DIR/lower_intrinsics.rs:+3:43: +3:45
|
|
|
|
let _13: isize; // in scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
|
|
|
let mut _14: &E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
|
|
|
let _15: &E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
|
|
|
let _16: E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:43: +4:47
|
|
|
|
let mut _17: &E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
|
|
|
let mut _18: &(); // in scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
|
|
|
let mut _19: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
2020-12-10 18:00:00 -06:00
|
|
|
|
|
|
|
bb0: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageLive(_2); // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
|
|
|
StorageLive(_3); // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
|
|
|
|
StorageLive(_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
|
|
|
|
_4 = &_1; // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
|
|
|
|
_3 = &(*_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
|
2023-04-05 03:17:40 -05:00
|
|
|
- _2 = discriminant_value::<T>(move _3) -> [return: bb1, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
2020-12-10 18:00:00 -06:00
|
|
|
- // mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
- // + span: $DIR/lower_intrinsics.rs:82:5: 82:41
|
2022-09-21 10:57:30 -05:00
|
|
|
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a T) -> <T as DiscriminantKind>::Discriminant {discriminant_value::<T>}, val: Value(<ZST>) }
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _2 = discriminant((*_3)); // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
|
|
|
+ goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb1: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_3); // scope 0 at $DIR/lower_intrinsics.rs:+1:44: +1:45
|
|
|
|
StorageDead(_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:45: +1:46
|
|
|
|
StorageDead(_2); // scope 0 at $DIR/lower_intrinsics.rs:+1:45: +1:46
|
|
|
|
StorageLive(_5); // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
|
|
|
StorageLive(_6); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
|
|
|
StorageLive(_7); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
2022-07-28 04:06:16 -05:00
|
|
|
_19 = const _; // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
2020-12-10 18:00:00 -06:00
|
|
|
// mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
// + span: $DIR/lower_intrinsics.rs:83:42: 83:44
|
2022-02-21 01:10:07 -06:00
|
|
|
// + literal: Const { ty: &i32, val: Unevaluated(discriminant, [T], Some(promoted[2])) }
|
2022-07-27 13:47:42 -05:00
|
|
|
_7 = &(*_19); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
|
|
|
_6 = &(*_7); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
|
2023-04-05 03:17:40 -05:00
|
|
|
- _5 = discriminant_value::<i32>(move _6) -> [return: bb2, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
2020-12-10 18:00:00 -06:00
|
|
|
- // mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
- // + span: $DIR/lower_intrinsics.rs:83:5: 83:41
|
2022-09-21 10:57:30 -05:00
|
|
|
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a i32) -> <i32 as DiscriminantKind>::Discriminant {discriminant_value::<i32>}, val: Value(<ZST>) }
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _5 = discriminant((*_6)); // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
|
|
|
+ goto -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb2: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_6); // scope 0 at $DIR/lower_intrinsics.rs:+2:44: +2:45
|
|
|
|
StorageDead(_7); // scope 0 at $DIR/lower_intrinsics.rs:+2:45: +2:46
|
|
|
|
StorageDead(_5); // scope 0 at $DIR/lower_intrinsics.rs:+2:45: +2:46
|
|
|
|
StorageLive(_9); // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
|
|
|
StorageLive(_10); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
|
|
|
StorageLive(_11); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
2022-07-28 04:06:16 -05:00
|
|
|
_18 = const _; // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
2020-12-10 18:00:00 -06:00
|
|
|
// mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
// + span: $DIR/lower_intrinsics.rs:84:42: 84:45
|
2022-02-21 01:10:07 -06:00
|
|
|
// + literal: Const { ty: &(), val: Unevaluated(discriminant, [T], Some(promoted[1])) }
|
2022-07-27 13:47:42 -05:00
|
|
|
_11 = &(*_18); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
|
|
|
_10 = &(*_11); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
|
2023-04-05 03:17:40 -05:00
|
|
|
- _9 = discriminant_value::<()>(move _10) -> [return: bb3, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
2020-12-10 18:00:00 -06:00
|
|
|
- // mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
- // + span: $DIR/lower_intrinsics.rs:84:5: 84:41
|
2022-09-21 10:57:30 -05:00
|
|
|
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a ()) -> <() as DiscriminantKind>::Discriminant {discriminant_value::<()>}, val: Value(<ZST>) }
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _9 = discriminant((*_10)); // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
|
|
|
+ goto -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb3: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_10); // scope 0 at $DIR/lower_intrinsics.rs:+3:45: +3:46
|
|
|
|
StorageDead(_11); // scope 0 at $DIR/lower_intrinsics.rs:+3:46: +3:47
|
|
|
|
StorageDead(_9); // scope 0 at $DIR/lower_intrinsics.rs:+3:46: +3:47
|
|
|
|
StorageLive(_13); // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
|
|
|
StorageLive(_14); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
|
|
|
StorageLive(_15); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
2022-07-28 04:06:16 -05:00
|
|
|
_17 = const _; // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
2020-12-10 18:00:00 -06:00
|
|
|
// mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
// + span: $DIR/lower_intrinsics.rs:85:42: 85:47
|
2022-02-21 01:10:07 -06:00
|
|
|
// + literal: Const { ty: &E, val: Unevaluated(discriminant, [T], Some(promoted[0])) }
|
2022-07-27 13:47:42 -05:00
|
|
|
_15 = &(*_17); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
|
|
|
_14 = &(*_15); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
|
2023-04-05 03:17:40 -05:00
|
|
|
- _13 = discriminant_value::<E>(move _14) -> [return: bb4, unwind unreachable]; // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
2020-12-10 18:00:00 -06:00
|
|
|
- // mir::Constant
|
2023-02-24 20:32:52 -06:00
|
|
|
- // + span: $DIR/lower_intrinsics.rs:85:5: 85:41
|
2022-09-21 10:57:30 -05:00
|
|
|
- // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a E) -> <E as DiscriminantKind>::Discriminant {discriminant_value::<E>}, val: Value(<ZST>) }
|
2022-07-27 13:47:42 -05:00
|
|
|
+ _13 = discriminant((*_14)); // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
|
|
|
+ goto -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb4: {
|
2022-07-27 13:47:42 -05:00
|
|
|
StorageDead(_14); // scope 0 at $DIR/lower_intrinsics.rs:+4:47: +4:48
|
|
|
|
StorageDead(_15); // scope 0 at $DIR/lower_intrinsics.rs:+4:48: +4:49
|
|
|
|
StorageDead(_13); // scope 0 at $DIR/lower_intrinsics.rs:+4:48: +4:49
|
|
|
|
_0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:+0:30: +5:2
|
2022-08-20 23:47:53 -05:00
|
|
|
drop(_1) -> [return: bb5, unwind: bb6]; // scope 0 at $DIR/lower_intrinsics.rs:+5:1: +5:2
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
bb5: {
|
2022-07-27 13:47:42 -05:00
|
|
|
return; // scope 0 at $DIR/lower_intrinsics.rs:+5:2: +5:2
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
2022-08-20 23:47:53 -05:00
|
|
|
|
|
|
|
bb6 (cleanup): {
|
|
|
|
resume; // scope 0 at $DIR/lower_intrinsics.rs:+0:1: +5:2
|
|
|
|
}
|
2020-12-10 18:00:00 -06:00
|
|
|
}
|
|
|
|
|