File tree 2 files changed +6
-8
lines changed
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> {
160
160
161
161
for ( field_idx, field_def) in variant. fields . iter ( ) . enumerate ( ) {
162
162
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
+ ) ;
169
167
170
168
let field_type = self . dwarf_ty ( field_layout. ty ) ;
171
169
Original file line number Diff line number Diff line change @@ -789,7 +789,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
789
789
return ;
790
790
}
791
791
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 ) {
793
793
with_no_trimmed_paths( || crate :: base:: codegen_panic(
794
794
fx,
795
795
& format!( "attempted to zero-initialize type `{}`, which is invalid" , T ) ,
@@ -798,7 +798,7 @@ pub(crate) fn codegen_intrinsic_call<'tcx>(
798
798
return ;
799
799
}
800
800
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 ) {
802
802
with_no_trimmed_paths( || crate :: base:: codegen_panic(
803
803
fx,
804
804
& format!( "attempted to leave type `{}` uninitialized, which is invalid" , T ) ,
You can’t perform that action at this time.
0 commit comments