@@ -13,8 +13,8 @@ use rustc_smir::rustc_internal::internal;
1313use stable_mir:: mir:: {
1414 AggregateKind , AssertMessage , Body , BorrowKind , CastKind , ConstOperand , CopyNonOverlapping ,
1515 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 ,
1818 UserTypeProjection , Variance ,
1919} ;
2020
@@ -225,10 +225,9 @@ impl RustcInternalMir for Rvalue {
225225
226226 fn internal_mir < ' tcx > ( & self , tcx : TyCtxt < ' tcx > ) -> Self :: T < ' tcx > {
227227 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+ }
232231 Rvalue :: Aggregate ( aggregate_kind, operands) => rustc_middle:: mir:: Rvalue :: Aggregate (
233232 Box :: new ( aggregate_kind. internal_mir ( tcx) ) ,
234233 rustc_index:: IndexVec :: from_raw (
@@ -284,18 +283,6 @@ impl RustcInternalMir for Rvalue {
284283 }
285284}
286285
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-
299286impl RustcInternalMir for FakeReadCause {
300287 type T < ' tcx > = rustc_middle:: mir:: FakeReadCause ;
301288
0 commit comments