@@ -332,7 +332,7 @@ impl TargetDataLayout {
332332 16 => 1 << 15 ,
333333 32 => 1 << 31 ,
334334 64 => 1 << 47 ,
335- bits => panic ! ( "obj_size_bound: unknown pointer bit size {}" , bits ) ,
335+ bits => panic ! ( "obj_size_bound: unknown pointer bit size {bits}" ) ,
336336 }
337337 }
338338
@@ -342,7 +342,7 @@ impl TargetDataLayout {
342342 16 => I16 ,
343343 32 => I32 ,
344344 64 => I64 ,
345- bits => panic ! ( "ptr_sized_integer: unknown pointer bit size {}" , bits ) ,
345+ bits => panic ! ( "ptr_sized_integer: unknown pointer bit size {bits}" ) ,
346346 }
347347 }
348348
@@ -399,7 +399,7 @@ impl FromStr for Endian {
399399 match s {
400400 "little" => Ok ( Self :: Little ) ,
401401 "big" => Ok ( Self :: Big ) ,
402- _ => Err ( format ! ( r#"unknown endian: "{}""# , s ) ) ,
402+ _ => Err ( format ! ( r#"unknown endian: "{s }""# ) ) ,
403403 }
404404 }
405405}
@@ -456,7 +456,7 @@ impl Size {
456456 pub fn bits ( self ) -> u64 {
457457 #[ cold]
458458 fn overflow ( bytes : u64 ) -> ! {
459- panic ! ( "Size::bits: {} bytes in bits doesn't fit in u64" , bytes )
459+ panic ! ( "Size::bits: {bytes } bytes in bits doesn't fit in u64" )
460460 }
461461
462462 self . bytes ( ) . checked_mul ( 8 ) . unwrap_or_else ( || overflow ( self . bytes ( ) ) )
@@ -1179,17 +1179,12 @@ impl FieldsShape {
11791179 unreachable ! ( "FieldsShape::offset: `Primitive`s have no fields" )
11801180 }
11811181 FieldsShape :: Union ( count) => {
1182- assert ! (
1183- i < count. get( ) ,
1184- "tried to access field {} of union with {} fields" ,
1185- i,
1186- count
1187- ) ;
1182+ assert ! ( i < count. get( ) , "tried to access field {i} of union with {count} fields" ) ;
11881183 Size :: ZERO
11891184 }
11901185 FieldsShape :: Array { stride, count } => {
11911186 let i = u64:: try_from ( i) . unwrap ( ) ;
1192- assert ! ( i < count, "tried to access field {} of array with {} fields" , i , count ) ;
1187+ assert ! ( i < count, "tried to access field {i } of array with {count } fields" ) ;
11931188 stride * i
11941189 }
11951190 FieldsShape :: Arbitrary { ref offsets, .. } => offsets[ FieldIdx :: from_usize ( i) ] ,
@@ -1294,7 +1289,7 @@ impl Abi {
12941289 Primitive :: Int ( _, signed) => signed,
12951290 _ => false ,
12961291 } ,
1297- _ => panic ! ( "`is_signed` on non-scalar ABI {:?}" , self ) ,
1292+ _ => panic ! ( "`is_signed` on non-scalar ABI {self :?}" ) ,
12981293 }
12991294 }
13001295
0 commit comments