@@ -4,7 +4,6 @@ use crate::MirPass;
4
4
use rustc_middle:: mir:: * ;
5
5
use rustc_middle:: ty:: { self , TyCtxt } ;
6
6
use rustc_span:: symbol:: sym;
7
- use rustc_target:: abi:: { FieldIdx , VariantIdx } ;
8
7
9
8
pub struct LowerIntrinsics ;
10
9
@@ -251,37 +250,6 @@ impl<'tcx> MirPass<'tcx> for LowerIntrinsics {
251
250
} ) ;
252
251
terminator. kind = TerminatorKind :: Goto { target } ;
253
252
}
254
- sym:: option_payload_ptr => {
255
- if let ( Some ( target) , Some ( arg) ) = ( * target, args[ 0 ] . place ( ) ) {
256
- let ty:: RawPtr ( ty:: TypeAndMut { ty : dest_ty, .. } ) =
257
- destination. ty ( local_decls, tcx) . ty . kind ( )
258
- else {
259
- bug ! ( ) ;
260
- } ;
261
-
262
- block. statements . push ( Statement {
263
- source_info : terminator. source_info ,
264
- kind : StatementKind :: Assign ( Box :: new ( (
265
- * destination,
266
- Rvalue :: AddressOf (
267
- Mutability :: Not ,
268
- arg. project_deeper (
269
- & [
270
- PlaceElem :: Deref ,
271
- PlaceElem :: Downcast (
272
- Some ( sym:: Some ) ,
273
- VariantIdx :: from_u32 ( 1 ) ,
274
- ) ,
275
- PlaceElem :: Field ( FieldIdx :: from_u32 ( 0 ) , * dest_ty) ,
276
- ] ,
277
- tcx,
278
- ) ,
279
- ) ,
280
- ) ) ) ,
281
- } ) ;
282
- terminator. kind = TerminatorKind :: Goto { target } ;
283
- }
284
- }
285
253
sym:: transmute | sym:: transmute_unchecked => {
286
254
let dst_ty = destination. ty ( local_decls, tcx) . ty ;
287
255
let Ok ( [ arg] ) = <[ _ ; 1 ] >:: try_from ( std:: mem:: take ( args) ) else {
0 commit comments