@@ -184,9 +184,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
184
184
debug_assert_eq ! (
185
185
( data_layout. pointer_size, data_layout. pointer_align. abi) ,
186
186
cx. size_and_align_of( ptr_type) ,
187
- "ptr_type={}, pointee_type={}" ,
188
- ptr_type,
189
- pointee_type,
187
+ "ptr_type={ptr_type}, pointee_type={pointee_type}" ,
190
188
) ;
191
189
192
190
let di_node = unsafe {
@@ -521,7 +519,7 @@ fn recursion_marker_type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) -> &'ll D
521
519
fn hex_encode ( data : & [ u8 ] ) -> String {
522
520
let mut hex_string = String :: with_capacity ( data. len ( ) * 2 ) ;
523
521
for byte in data. iter ( ) {
524
- write ! ( & mut hex_string, "{:02x}" , byte ) . unwrap ( ) ;
522
+ write ! ( & mut hex_string, "{byte :02x}" ) . unwrap ( ) ;
525
523
}
526
524
hex_string
527
525
}
@@ -766,7 +764,7 @@ fn build_param_type_di_node<'ll, 'tcx>(
766
764
t : Ty < ' tcx > ,
767
765
) -> DINodeCreationResult < ' ll > {
768
766
debug ! ( "build_param_type_di_node: {:?}" , t) ;
769
- let name = format ! ( "{:?}" , t ) ;
767
+ let name = format ! ( "{t :?}" ) ;
770
768
DINodeCreationResult {
771
769
di_node : unsafe {
772
770
llvm:: LLVMRustDIBuilderCreateBasicType (
@@ -814,7 +812,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
814
812
debug ! ( "build_compile_unit_di_node: {:?}" , name_in_debuginfo) ;
815
813
let rustc_producer = format ! ( "rustc version {}" , tcx. sess. cfg_version) ;
816
814
// FIXME(#41252) Remove "clang LLVM" if we can get GDB and LLVM to play nice.
817
- let producer = format ! ( "clang LLVM ({})" , rustc_producer ) ;
815
+ let producer = format ! ( "clang LLVM ({rustc_producer })" ) ;
818
816
819
817
let name_in_debuginfo = name_in_debuginfo. to_string_lossy ( ) ;
820
818
let work_dir = tcx. sess . opts . working_dir . to_string_lossy ( FileNameDisplayPreference :: Remapped ) ;
@@ -1331,10 +1329,10 @@ fn build_vtable_type_di_node<'ll, 'tcx>(
1331
1329
// Note: This code does not try to give a proper name to each method
1332
1330
// because their might be multiple methods with the same name
1333
1331
// (coming from different traits).
1334
- ( format ! ( "__method{}" , index ) , void_pointer_type_di_node)
1332
+ ( format ! ( "__method{index}" ) , void_pointer_type_di_node)
1335
1333
}
1336
1334
ty:: VtblEntry :: TraitVPtr ( _) => {
1337
- ( format ! ( "__super_trait_ptr{}" , index ) , void_pointer_type_di_node)
1335
+ ( format ! ( "__super_trait_ptr{index}" ) , void_pointer_type_di_node)
1338
1336
}
1339
1337
ty:: VtblEntry :: MetadataAlign => ( "align" . to_string ( ) , usize_di_node) ,
1340
1338
ty:: VtblEntry :: MetadataSize => ( "size" . to_string ( ) , usize_di_node) ,
@@ -1504,5 +1502,5 @@ pub fn tuple_field_name(field_index: usize) -> Cow<'static, str> {
1504
1502
TUPLE_FIELD_NAMES
1505
1503
. get ( field_index)
1506
1504
. map ( |s| Cow :: from ( * s) )
1507
- . unwrap_or_else ( || Cow :: from ( format ! ( "__{}" , field_index ) ) )
1505
+ . unwrap_or_else ( || Cow :: from ( format ! ( "__{field_index}" ) ) )
1508
1506
}
0 commit comments