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