@@ -13,8 +13,8 @@ use rustc_smir::rustc_internal::internal;
13
13
use stable_mir:: mir:: {
14
14
AggregateKind , AssertMessage , Body , BorrowKind , CastKind , ConstOperand , CopyNonOverlapping ,
15
15
CoroutineDesugaring , CoroutineKind , CoroutineSource , FakeBorrowKind , FakeReadCause , LocalDecl ,
16
- MutBorrowKind , NonDivergingIntrinsic , NullOp , Operand , PointerCoercion , RawPtrKind , RetagKind ,
17
- Rvalue , Statement , StatementKind , SwitchTargets , Terminator , TerminatorKind , UnwindAction ,
16
+ MutBorrowKind , NonDivergingIntrinsic , NullOp , Operand , PointerCoercion , RetagKind , Rvalue ,
17
+ Statement , StatementKind , SwitchTargets , Terminator , TerminatorKind , UnwindAction ,
18
18
UserTypeProjection , Variance ,
19
19
} ;
20
20
@@ -225,10 +225,9 @@ impl RustcInternalMir for Rvalue {
225
225
226
226
fn internal_mir < ' tcx > ( & self , tcx : TyCtxt < ' tcx > ) -> Self :: T < ' tcx > {
227
227
match self {
228
- Rvalue :: AddressOf ( raw_ptr_kind, place) => rustc_middle:: mir:: Rvalue :: RawPtr (
229
- raw_ptr_kind. internal_mir ( tcx) ,
230
- internal ( tcx, place) ,
231
- ) ,
228
+ Rvalue :: AddressOf ( raw_ptr_kind, place) => {
229
+ rustc_middle:: mir:: Rvalue :: RawPtr ( internal ( tcx, raw_ptr_kind) , internal ( tcx, place) )
230
+ }
232
231
Rvalue :: Aggregate ( aggregate_kind, operands) => rustc_middle:: mir:: Rvalue :: Aggregate (
233
232
Box :: new ( aggregate_kind. internal_mir ( tcx) ) ,
234
233
rustc_index:: IndexVec :: from_raw (
@@ -284,18 +283,6 @@ impl RustcInternalMir for Rvalue {
284
283
}
285
284
}
286
285
287
- impl RustcInternalMir for RawPtrKind {
288
- type T < ' tcx > = rustc_middle:: mir:: RawPtrKind ;
289
-
290
- fn internal_mir < ' tcx > ( & self , _tcx : TyCtxt < ' tcx > ) -> Self :: T < ' tcx > {
291
- match self {
292
- RawPtrKind :: Mut => rustc_middle:: mir:: RawPtrKind :: Mut ,
293
- RawPtrKind :: Const => rustc_middle:: mir:: RawPtrKind :: Const ,
294
- RawPtrKind :: FakeForPtrMetadata => rustc_middle:: mir:: RawPtrKind :: FakeForPtrMetadata ,
295
- }
296
- }
297
- }
298
-
299
286
impl RustcInternalMir for FakeReadCause {
300
287
type T < ' tcx > = rustc_middle:: mir:: FakeReadCause ;
301
288
0 commit comments