@@ -129,7 +129,6 @@ impl GotocCtx<'_, '_> {
129129 . assign ( self . codegen_rvalue_stable ( rhs, location) , location)
130130 }
131131 }
132- StatementKind :: Deinit ( place) => self . codegen_deinit ( place, location) ,
133132 StatementKind :: SetDiscriminant { place, variant_index } => {
134133 let dest_ty = self . place_ty_stable ( place) ;
135134 let dest_expr = unwrap_or_return_codegen_unimplemented_stmt ! (
@@ -444,27 +443,6 @@ impl GotocCtx<'_, '_> {
444443 }
445444 }
446445
447- /// From rustc doc: "This writes `uninit` bytes to the entire place."
448- /// Our model of GotoC has a similar statement, which is later lowered
449- /// to assigning a Nondet in CBMC, with a comment specifying that it
450- /// corresponds to a Deinit.
451- fn codegen_deinit ( & mut self , place : & Place , loc : Location ) -> Stmt {
452- let dst_mir_ty = self . place_ty_stable ( place) ;
453- let dst_type = self . codegen_ty_stable ( dst_mir_ty) ;
454- let layout = self . layout_of_stable ( dst_mir_ty) ;
455- if layout. is_zst ( ) || dst_type. sizeof_in_bits ( & self . symbol_table ) == 0 {
456- // We ignore assignment for all zero size types
457- Stmt :: skip ( loc)
458- } else {
459- unwrap_or_return_codegen_unimplemented_stmt ! (
460- self ,
461- self . codegen_place_stable( place, loc)
462- )
463- . goto_expr
464- . deinit ( loc)
465- }
466- }
467-
468446 /// A special case handler to codegen `return ();`
469447 fn codegen_ret_unit ( & mut self , loc : Location ) -> Stmt {
470448 let is_file_local = false ;
0 commit comments