File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/librustc_mir/interpret Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -389,9 +389,11 @@ where
389389 // above). In that case, all fields are equal.
390390 let field_layout = base. layout . field ( self , usize:: try_from ( field) . unwrap_or ( 0 ) ) ?;
391391
392- // Offset may need adjustment for unsized fields
392+ // Offset may need adjustment for unsized fields.
393393 let ( meta, offset) = if field_layout. is_unsized ( ) {
394- // re-use parent metadata to determine dynamic field layout
394+ // Re-use parent metadata to determine dynamic field layout.
395+ // With custom DSTS, this *will* execute user-defined code, but the same
396+ // happens at run-time so that's okay.
395397 let align = match self . size_and_align_of ( base. meta , field_layout) ? {
396398 Some ( ( _, align) ) => align,
397399 None if offset == Size :: ZERO =>
You can’t perform that action at this time.
0 commit comments