File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
src/librustc_mir/interpret Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -353,9 +353,10 @@ where
353353 // Offset may need adjustment for unsized fields
354354 let ( meta, offset) = if field_layout. is_unsized ( ) {
355355 // re-use parent metadata to determine dynamic field layout
356- let ( _, align) = self . size_and_align_of ( base. meta , field_layout) ?
357- // If this is an extern type, we fall back to its static size and alignment.
358- . unwrap_or_else ( || base. layout . size_and_align ( ) ) ;
356+ let align = self . size_and_align_of ( base. meta , field_layout) ?
357+ . map ( |( _, align) | align)
358+ // If this is an extern type, we fall back to its static alignment.
359+ . unwrap_or_else ( || base. layout . align ) ;
359360 ( base. meta , offset. abi_align ( align) )
360361 } else {
361362 // base.meta could be present; we might be accessing a sized field of an unsized
You can’t perform that action at this time.
0 commit comments