@@ -184,9 +184,7 @@ fn build_pointer_or_reference_di_node<'ll, 'tcx>(
184184 debug_assert_eq ! (
185185 ( data_layout. pointer_size, data_layout. pointer_align. abi) ,
186186 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}" ,
190188 ) ;
191189
192190 let di_node = unsafe {
@@ -521,7 +519,7 @@ fn recursion_marker_type_di_node<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>) -> &'ll D
521519fn hex_encode ( data : & [ u8 ] ) -> String {
522520 let mut hex_string = String :: with_capacity ( data. len ( ) * 2 ) ;
523521 for byte in data. iter ( ) {
524- write ! ( & mut hex_string, "{:02x}" , byte ) . unwrap ( ) ;
522+ write ! ( & mut hex_string, "{byte :02x}" ) . unwrap ( ) ;
525523 }
526524 hex_string
527525}
@@ -766,7 +764,7 @@ fn build_param_type_di_node<'ll, 'tcx>(
766764 t : Ty < ' tcx > ,
767765) -> DINodeCreationResult < ' ll > {
768766 debug ! ( "build_param_type_di_node: {:?}" , t) ;
769- let name = format ! ( "{:?}" , t ) ;
767+ let name = format ! ( "{t :?}" ) ;
770768 DINodeCreationResult {
771769 di_node : unsafe {
772770 llvm:: LLVMRustDIBuilderCreateBasicType (
@@ -814,7 +812,7 @@ pub fn build_compile_unit_di_node<'ll, 'tcx>(
814812 debug ! ( "build_compile_unit_di_node: {:?}" , name_in_debuginfo) ;
815813 let rustc_producer = format ! ( "rustc version {}" , tcx. sess. cfg_version) ;
816814 // 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 })" ) ;
818816
819817 let name_in_debuginfo = name_in_debuginfo. to_string_lossy ( ) ;
820818 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>(
13311329 // Note: This code does not try to give a proper name to each method
13321330 // because their might be multiple methods with the same name
13331331 // (coming from different traits).
1334- ( format ! ( "__method{}" , index ) , void_pointer_type_di_node)
1332+ ( format ! ( "__method{index}" ) , void_pointer_type_di_node)
13351333 }
13361334 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)
13381336 }
13391337 ty:: VtblEntry :: MetadataAlign => ( "align" . to_string ( ) , usize_di_node) ,
13401338 ty:: VtblEntry :: MetadataSize => ( "size" . to_string ( ) , usize_di_node) ,
@@ -1504,5 +1502,5 @@ pub fn tuple_field_name(field_index: usize) -> Cow<'static, str> {
15041502 TUPLE_FIELD_NAMES
15051503 . get ( field_index)
15061504 . map ( |s| Cow :: from ( * s) )
1507- . unwrap_or_else ( || Cow :: from ( format ! ( "__{}" , field_index ) ) )
1505+ . unwrap_or_else ( || Cow :: from ( format ! ( "__{field_index}" ) ) )
15081506}
0 commit comments