File tree Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Expand file tree Collapse file tree 2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -160,12 +160,10 @@ impl<'tcx> DebugContext<'tcx> {
160160
161161 for ( field_idx, field_def) in variant. fields . iter ( ) . enumerate ( ) {
162162 let field_offset = layout. fields . offset ( field_idx) ;
163- let field_layout = layout
164- . field (
165- & layout:: LayoutCx { tcx : self . tcx , param_env : ParamEnv :: reveal_all ( ) } ,
166- field_idx,
167- )
168- . unwrap ( ) ;
163+ let field_layout = layout. field (
164+ & layout:: LayoutCx { tcx : self . tcx , param_env : ParamEnv :: reveal_all ( ) } ,
165+ field_idx,
166+ ) ;
169167
170168 let field_type = self . dwarf_ty ( field_layout. ty ) ;
171169
Original file line number Diff line number Diff line change @@ -789,7 +789,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
789789 return ;
790790 }
791791
792- if intrinsic == sym:: assert_zero_valid && !layout. might_permit_raw_init( fx, /*zero:*/ true ) . unwrap ( ) {
792+ if intrinsic == sym:: assert_zero_valid && !layout. might_permit_raw_init( fx, /*zero:*/ true ) {
793793 with_no_trimmed_paths( || crate :: base:: codegen_panic(
794794 fx,
795795 & format!( "attempted to zero-initialize type `{}`, which is invalid" , T ) ,
@@ -798,7 +798,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
798798 return ;
799799 }
800800
801- if intrinsic == sym:: assert_uninit_valid && !layout. might_permit_raw_init( fx, /*zero:*/ false ) . unwrap ( ) {
801+ if intrinsic == sym:: assert_uninit_valid && !layout. might_permit_raw_init( fx, /*zero:*/ false ) {
802802 with_no_trimmed_paths( || crate :: base:: codegen_panic(
803803 fx,
804804 & format!( "attempted to leave type `{}` uninitialized, which is invalid" , T ) ,
You can’t perform that action at this time.
0 commit comments