]>
Commit | Line | Data |
---|---|---|
fc512014 XL |
1 | - // MIR for `discriminant` before LowerIntrinsics |
2 | + // MIR for `discriminant` after LowerIntrinsics | |
3 | ||
4 | fn discriminant(_1: T) -> () { | |
5 | debug t => _1; // in scope 0 at $DIR/lower_intrinsics.rs:68:24: 68:25 | |
6 | let mut _0: (); // return place in scope 0 at $DIR/lower_intrinsics.rs:68:30: 68:30 | |
7 | let _2: <T as std::marker::DiscriminantKind>::Discriminant; // in scope 0 at $DIR/lower_intrinsics.rs:69:5: 69:45 | |
8 | let mut _3: &T; // in scope 0 at $DIR/lower_intrinsics.rs:69:42: 69:44 | |
9 | let _4: &T; // in scope 0 at $DIR/lower_intrinsics.rs:69:42: 69:44 | |
10 | let _5: u8; // in scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45 | |
11 | let mut _6: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
12 | let _7: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
13 | let _8: i32; // in scope 0 at $DIR/lower_intrinsics.rs:70:43: 70:44 | |
14 | let _9: u8; // in scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46 | |
15 | let mut _10: &(); // in scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
16 | let _11: &(); // in scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
17 | let _12: (); // in scope 0 at $DIR/lower_intrinsics.rs:71:43: 71:45 | |
18 | let _13: isize; // in scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48 | |
19 | let mut _14: &E; // in scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
20 | let _15: &E; // in scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
21 | let _16: E; // in scope 0 at $DIR/lower_intrinsics.rs:72:43: 72:47 | |
22 | let mut _17: &E; // in scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
23 | let mut _18: &(); // in scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
24 | let mut _19: &i32; // in scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
25 | ||
26 | bb0: { | |
27 | StorageLive(_2); // scope 0 at $DIR/lower_intrinsics.rs:69:5: 69:45 | |
28 | StorageLive(_3); // scope 0 at $DIR/lower_intrinsics.rs:69:42: 69:44 | |
29 | StorageLive(_4); // scope 0 at $DIR/lower_intrinsics.rs:69:42: 69:44 | |
30 | _4 = &_1; // scope 0 at $DIR/lower_intrinsics.rs:69:42: 69:44 | |
31 | _3 = &(*_4); // scope 0 at $DIR/lower_intrinsics.rs:69:42: 69:44 | |
32 | - _2 = discriminant_value::<T>(move _3) -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:69:5: 69:45 | |
33 | - // mir::Constant | |
34 | - // + span: $DIR/lower_intrinsics.rs:69:5: 69:41 | |
35 | - // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r T) -> <T as std::marker::DiscriminantKind>::Discriminant {std::intrinsics::discriminant_value::<T>}, val: Value(Scalar(<ZST>)) } | |
36 | + _2 = discriminant((*_3)); // scope 0 at $DIR/lower_intrinsics.rs:69:5: 69:45 | |
37 | + goto -> bb1; // scope 0 at $DIR/lower_intrinsics.rs:69:5: 69:45 | |
38 | } | |
39 | ||
40 | bb1: { | |
41 | StorageDead(_3); // scope 0 at $DIR/lower_intrinsics.rs:69:44: 69:45 | |
42 | StorageDead(_4); // scope 0 at $DIR/lower_intrinsics.rs:69:45: 69:46 | |
43 | StorageDead(_2); // scope 0 at $DIR/lower_intrinsics.rs:69:45: 69:46 | |
44 | StorageLive(_5); // scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45 | |
45 | StorageLive(_6); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
46 | StorageLive(_7); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
47 | _19 = const discriminant::<T>::promoted[2]; // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
48 | // ty::Const | |
49 | // + ty: &i32 | |
cdc7bbd5 | 50 | // + val: Unevaluated(discriminant, [T], Some(promoted[2])) |
fc512014 XL |
51 | // mir::Constant |
52 | // + span: $DIR/lower_intrinsics.rs:70:42: 70:44 | |
136023e0 | 53 | // + literal: Const { ty: &i32, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[2872]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[2]) }) } |
fc512014 XL |
54 | _7 = &(*_19); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 |
55 | _6 = &(*_7); // scope 0 at $DIR/lower_intrinsics.rs:70:42: 70:44 | |
56 | - _5 = discriminant_value::<i32>(move _6) -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45 | |
57 | - // mir::Constant | |
58 | - // + span: $DIR/lower_intrinsics.rs:70:5: 70:41 | |
59 | - // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r i32) -> <i32 as std::marker::DiscriminantKind>::Discriminant {std::intrinsics::discriminant_value::<i32>}, val: Value(Scalar(<ZST>)) } | |
60 | + _5 = discriminant((*_6)); // scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45 | |
61 | + goto -> bb2; // scope 0 at $DIR/lower_intrinsics.rs:70:5: 70:45 | |
62 | } | |
63 | ||
64 | bb2: { | |
65 | StorageDead(_6); // scope 0 at $DIR/lower_intrinsics.rs:70:44: 70:45 | |
66 | StorageDead(_7); // scope 0 at $DIR/lower_intrinsics.rs:70:45: 70:46 | |
67 | StorageDead(_5); // scope 0 at $DIR/lower_intrinsics.rs:70:45: 70:46 | |
68 | StorageLive(_9); // scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46 | |
69 | StorageLive(_10); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
70 | StorageLive(_11); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
71 | _18 = const discriminant::<T>::promoted[1]; // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
72 | // ty::Const | |
73 | // + ty: &() | |
cdc7bbd5 | 74 | // + val: Unevaluated(discriminant, [T], Some(promoted[1])) |
fc512014 XL |
75 | // mir::Constant |
76 | // + span: $DIR/lower_intrinsics.rs:71:42: 71:45 | |
136023e0 | 77 | // + literal: Const { ty: &(), val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[2872]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[1]) }) } |
fc512014 XL |
78 | _11 = &(*_18); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 |
79 | _10 = &(*_11); // scope 0 at $DIR/lower_intrinsics.rs:71:42: 71:45 | |
80 | - _9 = discriminant_value::<()>(move _10) -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46 | |
81 | - // mir::Constant | |
82 | - // + span: $DIR/lower_intrinsics.rs:71:5: 71:41 | |
83 | - // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r ()) -> <() as std::marker::DiscriminantKind>::Discriminant {std::intrinsics::discriminant_value::<()>}, val: Value(Scalar(<ZST>)) } | |
84 | + _9 = discriminant((*_10)); // scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46 | |
85 | + goto -> bb3; // scope 0 at $DIR/lower_intrinsics.rs:71:5: 71:46 | |
86 | } | |
87 | ||
88 | bb3: { | |
89 | StorageDead(_10); // scope 0 at $DIR/lower_intrinsics.rs:71:45: 71:46 | |
90 | StorageDead(_11); // scope 0 at $DIR/lower_intrinsics.rs:71:46: 71:47 | |
91 | StorageDead(_9); // scope 0 at $DIR/lower_intrinsics.rs:71:46: 71:47 | |
92 | StorageLive(_13); // scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48 | |
93 | StorageLive(_14); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
94 | StorageLive(_15); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
95 | _17 = const discriminant::<T>::promoted[0]; // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
96 | // ty::Const | |
97 | // + ty: &E | |
cdc7bbd5 | 98 | // + val: Unevaluated(discriminant, [T], Some(promoted[0])) |
fc512014 XL |
99 | // mir::Constant |
100 | // + span: $DIR/lower_intrinsics.rs:72:42: 72:47 | |
136023e0 | 101 | // + literal: Const { ty: &E, val: Unevaluated(Unevaluated { def: WithOptConstParam { did: DefId(0:27 ~ lower_intrinsics[2872]::discriminant), const_param_did: None }, substs: [T], promoted: Some(promoted[0]) }) } |
fc512014 XL |
102 | _15 = &(*_17); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 |
103 | _14 = &(*_15); // scope 0 at $DIR/lower_intrinsics.rs:72:42: 72:47 | |
104 | - _13 = discriminant_value::<E>(move _14) -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48 | |
105 | - // mir::Constant | |
106 | - // + span: $DIR/lower_intrinsics.rs:72:5: 72:41 | |
107 | - // + literal: Const { ty: for<'r> extern "rust-intrinsic" fn(&'r E) -> <E as std::marker::DiscriminantKind>::Discriminant {std::intrinsics::discriminant_value::<E>}, val: Value(Scalar(<ZST>)) } | |
108 | + _13 = discriminant((*_14)); // scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48 | |
109 | + goto -> bb4; // scope 0 at $DIR/lower_intrinsics.rs:72:5: 72:48 | |
110 | } | |
111 | ||
112 | bb4: { | |
113 | StorageDead(_14); // scope 0 at $DIR/lower_intrinsics.rs:72:47: 72:48 | |
114 | StorageDead(_15); // scope 0 at $DIR/lower_intrinsics.rs:72:48: 72:49 | |
115 | StorageDead(_13); // scope 0 at $DIR/lower_intrinsics.rs:72:48: 72:49 | |
116 | _0 = const (); // scope 0 at $DIR/lower_intrinsics.rs:68:30: 73:2 | |
117 | drop(_1) -> bb5; // scope 0 at $DIR/lower_intrinsics.rs:73:1: 73:2 | |
118 | } | |
119 | ||
120 | bb5: { | |
121 | return; // scope 0 at $DIR/lower_intrinsics.rs:73:2: 73:2 | |
122 | } | |
123 | ||
124 | bb6 (cleanup): { | |
125 | resume; // scope 0 at $DIR/lower_intrinsics.rs:68:1: 73:2 | |
126 | } | |
127 | } | |
128 |