@@ -404,7 +404,10 @@ where
404
404
// to get some code to work that probably ought to work.
405
405
field_layout. align . abi
406
406
}
407
- None => span_bug ! ( self . cur_span( ) , "cannot compute offset for extern type field at non-0 offset" ) ,
407
+ None => span_bug ! (
408
+ self . cur_span( ) ,
409
+ "cannot compute offset for extern type field at non-0 offset"
410
+ ) ,
408
411
} ;
409
412
( base. meta , offset. align_to ( align) )
410
413
} else {
@@ -440,7 +443,11 @@ where
440
443
assert ! ( !field_layout. is_unsized( ) ) ;
441
444
base. offset ( offset, MemPlaceMeta :: None , field_layout, self )
442
445
}
443
- _ => span_bug ! ( self . cur_span( ) , "`mplace_index` called on non-array type {:?}" , base. layout. ty) ,
446
+ _ => span_bug ! (
447
+ self . cur_span( ) ,
448
+ "`mplace_index` called on non-array type {:?}" ,
449
+ base. layout. ty
450
+ ) ,
444
451
}
445
452
}
446
453
@@ -484,7 +491,9 @@ where
484
491
// (that have count 0 in their layout).
485
492
let from_offset = match base. layout . fields {
486
493
FieldsShape :: Array { stride, .. } => stride * from, // `Size` multiplication is checked
487
- _ => span_bug ! ( self . cur_span( ) , "unexpected layout of index access: {:#?}" , base. layout) ,
494
+ _ => {
495
+ span_bug ! ( self . cur_span( ) , "unexpected layout of index access: {:#?}" , base. layout)
496
+ }
488
497
} ;
489
498
490
499
// Compute meta and new layout
@@ -497,7 +506,9 @@ where
497
506
let len = Scalar :: from_machine_usize ( inner_len, self ) ;
498
507
( MemPlaceMeta :: Meta ( len) , base. layout . ty )
499
508
}
500
- _ => span_bug ! ( self . cur_span( ) , "cannot subslice non-array type: `{:?}`" , base. layout. ty) ,
509
+ _ => {
510
+ span_bug ! ( self . cur_span( ) , "cannot subslice non-array type: `{:?}`" , base. layout. ty)
511
+ }
501
512
} ;
502
513
let layout = self . layout_of ( ty) ?;
503
514
base. offset ( from_offset, meta, layout, self )
@@ -776,9 +787,11 @@ where
776
787
Immediate :: Scalar ( scalar) => {
777
788
match dest. layout . abi {
778
789
Abi :: Scalar ( _) => { } // fine
779
- _ => {
780
- span_bug ! ( self . cur_span( ) , "write_immediate_to_mplace: invalid Scalar layout: {:#?}" , dest. layout)
781
- }
790
+ _ => span_bug ! (
791
+ self . cur_span( ) ,
792
+ "write_immediate_to_mplace: invalid Scalar layout: {:#?}" ,
793
+ dest. layout
794
+ ) ,
782
795
}
783
796
self . memory . get_raw_mut ( ptr. alloc_id ) ?. write_scalar (
784
797
& tcx,
0 commit comments