@@ -332,7 +332,7 @@ impl TargetDataLayout {
332
332
16 => 1 << 15 ,
333
333
32 => 1 << 31 ,
334
334
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}" ) ,
336
336
}
337
337
}
338
338
@@ -342,7 +342,7 @@ impl TargetDataLayout {
342
342
16 => I16 ,
343
343
32 => I32 ,
344
344
64 => I64 ,
345
- bits => panic ! ( "ptr_sized_integer: unknown pointer bit size {}" , bits ) ,
345
+ bits => panic ! ( "ptr_sized_integer: unknown pointer bit size {bits}" ) ,
346
346
}
347
347
}
348
348
@@ -399,7 +399,7 @@ impl FromStr for Endian {
399
399
match s {
400
400
"little" => Ok ( Self :: Little ) ,
401
401
"big" => Ok ( Self :: Big ) ,
402
- _ => Err ( format ! ( r#"unknown endian: "{}""# , s ) ) ,
402
+ _ => Err ( format ! ( r#"unknown endian: "{s }""# ) ) ,
403
403
}
404
404
}
405
405
}
@@ -456,7 +456,7 @@ impl Size {
456
456
pub fn bits ( self ) -> u64 {
457
457
#[ cold]
458
458
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" )
460
460
}
461
461
462
462
self . bytes ( ) . checked_mul ( 8 ) . unwrap_or_else ( || overflow ( self . bytes ( ) ) )
@@ -1179,17 +1179,12 @@ impl FieldsShape {
1179
1179
unreachable ! ( "FieldsShape::offset: `Primitive`s have no fields" )
1180
1180
}
1181
1181
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" ) ;
1188
1183
Size :: ZERO
1189
1184
}
1190
1185
FieldsShape :: Array { stride, count } => {
1191
1186
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" ) ;
1193
1188
stride * i
1194
1189
}
1195
1190
FieldsShape :: Arbitrary { ref offsets, .. } => offsets[ FieldIdx :: from_usize ( i) ] ,
@@ -1294,7 +1289,7 @@ impl Abi {
1294
1289
Primitive :: Int ( _, signed) => signed,
1295
1290
_ => false ,
1296
1291
} ,
1297
- _ => panic ! ( "`is_signed` on non-scalar ABI {:?}" , self ) ,
1292
+ _ => panic ! ( "`is_signed` on non-scalar ABI {self :?}" ) ,
1298
1293
}
1299
1294
}
1300
1295
0 commit comments