@@ -4,7 +4,6 @@ use crate::MirPass;
44use rustc_middle:: mir:: * ;
55use rustc_middle:: ty:: { self , TyCtxt } ;
66use rustc_span:: symbol:: sym;
7- use rustc_target:: abi:: { FieldIdx , VariantIdx } ;
87
98pub struct LowerIntrinsics ;
109
@@ -251,37 +250,6 @@ impl<'tcx> MirPass<'tcx> for LowerIntrinsics {
251250 } ) ;
252251 terminator. kind = TerminatorKind :: Goto { target } ;
253252 }
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- }
285253 sym:: transmute | sym:: transmute_unchecked => {
286254 let dst_ty = destination. ty ( local_decls, tcx) . ty ;
287255 let Ok ( [ arg] ) = <[ _ ; 1 ] >:: try_from ( std:: mem:: take ( args) ) else {
0 commit comments