1 - // MIR for `discriminant` before LowerIntrinsics
2 + // MIR for `discriminant` after LowerIntrinsics
4 fn discriminant(_1: T) -> () {
5 debug t => _1; // in scope 0 at $DIR/lower_intrinsics.rs:+0:24: +0:25
6 let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:+0:30: +0:30
7 let _2: <T as std::marker::DiscriminantKind>::Discriminant; // in scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
8 let mut _3: &T; // in scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
9 let _4: &T; // in scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
10 let _5: u8; // in scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
11 let mut _6: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
12 let _7: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
13 let _8: i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:43: +2:44
14 let _9: u8; // in scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
15 let mut _10: &(); // in scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
16 let _11: &(); // in scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
17 let _12: (); // in scope 0 at $DIR/lower_intrinsics.rs:+3:43: +3:45
18 let _13: isize; // in scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
19 let mut _14: &E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
20 let _15: &E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
21 let _16: E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:43: +4:47
22 let mut _17: &E; // in scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
23 let mut _18: &(); // in scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
24 let mut _19: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
27 StorageLive(_2); // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
28 StorageLive(_3); // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
29 StorageLive(_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
30 _4 = &_1; // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
31 _3 = &(*_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:42: +1:44
32 - _2 = discriminant_value::<T>(move _3) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
34 - // + span: $DIR/lower_intrinsics.rs:49:5: 49:41
35 - // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a T) -> <T as DiscriminantKind>::Discriminant {discriminant_value::<T>}, val: Value(<ZST>) }
36 + _2 = discriminant((*_3)); // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
37 + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:+1:5: +1:45
41 StorageDead(_3); // scope 0 at $DIR/lower_intrinsics.rs:+1:44: +1:45
42 StorageDead(_4); // scope 0 at $DIR/lower_intrinsics.rs:+1:45: +1:46
43 StorageDead(_2); // scope 0 at $DIR/lower_intrinsics.rs:+1:45: +1:46
44 StorageLive(_5); // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
45 StorageLive(_6); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
46 StorageLive(_7); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
47 _19 = const _; // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
49 // + span: $DIR/lower_intrinsics.rs:50:42: 50:44
50 // + literal: Const { ty: &i32, val: Unevaluated(discriminant, [T], Some(promoted[2])) }
51 _7 = &(*_19); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
52 _6 = &(*_7); // scope 0 at $DIR/lower_intrinsics.rs:+2:42: +2:44
53 - _5 = discriminant_value::<i32>(move _6) -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
55 - // + span: $DIR/lower_intrinsics.rs:50:5: 50:41
56 - // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a i32) -> <i32 as DiscriminantKind>::Discriminant {discriminant_value::<i32>}, val: Value(<ZST>) }
57 + _5 = discriminant((*_6)); // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
58 + goto -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:+2:5: +2:45
62 StorageDead(_6); // scope 0 at $DIR/lower_intrinsics.rs:+2:44: +2:45
63 StorageDead(_7); // scope 0 at $DIR/lower_intrinsics.rs:+2:45: +2:46
64 StorageDead(_5); // scope 0 at $DIR/lower_intrinsics.rs:+2:45: +2:46
65 StorageLive(_9); // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
66 StorageLive(_10); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
67 StorageLive(_11); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
68 _18 = const _; // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
70 // + span: $DIR/lower_intrinsics.rs:51:42: 51:45
71 // + literal: Const { ty: &(), val: Unevaluated(discriminant, [T], Some(promoted[1])) }
72 _11 = &(*_18); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
73 _10 = &(*_11); // scope 0 at $DIR/lower_intrinsics.rs:+3:42: +3:45
74 - _9 = discriminant_value::<()>(move _10) -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
76 - // + span: $DIR/lower_intrinsics.rs:51:5: 51:41
77 - // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a ()) -> <() as DiscriminantKind>::Discriminant {discriminant_value::<()>}, val: Value(<ZST>) }
78 + _9 = discriminant((*_10)); // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
79 + goto -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:+3:5: +3:46
83 StorageDead(_10); // scope 0 at $DIR/lower_intrinsics.rs:+3:45: +3:46
84 StorageDead(_11); // scope 0 at $DIR/lower_intrinsics.rs:+3:46: +3:47
85 StorageDead(_9); // scope 0 at $DIR/lower_intrinsics.rs:+3:46: +3:47
86 StorageLive(_13); // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
87 StorageLive(_14); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
88 StorageLive(_15); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
89 _17 = const _; // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
91 // + span: $DIR/lower_intrinsics.rs:52:42: 52:47
92 // + literal: Const { ty: &E, val: Unevaluated(discriminant, [T], Some(promoted[0])) }
93 _15 = &(*_17); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
94 _14 = &(*_15); // scope 0 at $DIR/lower_intrinsics.rs:+4:42: +4:47
95 - _13 = discriminant_value::<E>(move _14) -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
97 - // + span: $DIR/lower_intrinsics.rs:52:5: 52:41
98 - // + literal: Const { ty: for<'a> extern "rust-intrinsic" fn(&'a E) -> <E as DiscriminantKind>::Discriminant {discriminant_value::<E>}, val: Value(<ZST>) }
99 + _13 = discriminant((*_14)); // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
100 + goto -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:+4:5: +4:48
104 StorageDead(_14); // scope 0 at $DIR/lower_intrinsics.rs:+4:47: +4:48
105 StorageDead(_15); // scope 0 at $DIR/lower_intrinsics.rs:+4:48: +4:49
106 StorageDead(_13); // scope 0 at $DIR/lower_intrinsics.rs:+4:48: +4:49
107 _0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:+0:30: +5:2
108 drop(_1) -> [return: bb5, unwind: bb6]; // scope 0 at $DIR/lower_intrinsics.rs:+5:1: +5:2
112 return; // scope 0 at $DIR/lower_intrinsics.rs:+5:2: +5:2
116 resume; // scope 0 at $DIR/lower_intrinsics.rs:+0:1: +5:2