@@ -331,12 +331,6 @@ pub fn render_register_mod(
331
331
write!( f, "{}" , self . bits( ) )
332
332
}
333
333
}
334
- #debug_feature
335
- impl core:: fmt:: Debug for crate :: generic:: Reg <#regspec_ty> {
336
- fn fmt( & self , f: & mut core:: fmt:: Formatter <' _>) -> core:: fmt:: Result {
337
- core:: fmt:: Debug :: fmt( & self . read( ) , f)
338
- }
339
- }
340
334
} ) ;
341
335
}
342
336
@@ -467,24 +461,22 @@ fn render_register_mod_debug(
467
461
Some ( a) => a,
468
462
None => access,
469
463
} ;
470
- let bit_or_bits = if f. bit_width ( ) > 1 { "bits" } else { "bit" } ;
471
- let bit_or_bits = syn:: Ident :: new ( bit_or_bits, span) ;
472
464
log:: debug!( "register={} field={}" , name, f. name) ;
473
465
if field_access. can_read ( ) && f. read_action . is_none ( ) {
474
466
if let Field :: Array ( _, de) = & f {
475
467
for suffix in de. indexes ( ) {
476
468
let f_name_n = field_accessor ( & f. name . expand_dim ( & suffix) , config, span) ;
477
469
let f_name_n_s = format ! ( "{f_name_n}" ) ;
478
470
r_debug_impl. extend ( quote ! {
479
- . field( #f_name_n_s, & self . #f_name_n( ) . #bit_or_bits ( ) )
471
+ . field( #f_name_n_s, & self . #f_name_n( ) )
480
472
} ) ;
481
473
}
482
474
} else {
483
475
let f_name = f. name . remove_dim ( ) ;
484
476
let f_name = field_accessor ( & f_name, config, span) ;
485
477
let f_name_s = format ! ( "{f_name}" ) ;
486
478
r_debug_impl. extend ( quote ! {
487
- . field( #f_name_s, & self . #f_name( ) . #bit_or_bits ( ) )
479
+ . field( #f_name_s, & self . #f_name( ) )
488
480
} ) ;
489
481
}
490
482
}
@@ -494,14 +486,6 @@ fn render_register_mod_debug(
494
486
#close
495
487
#close
496
488
} ) ;
497
- r_debug_impl. extend ( quote ! {
498
- #debug_feature
499
- impl core:: fmt:: Debug for crate :: generic:: Reg <#regspec_ty> {
500
- fn fmt( & self , f: & mut core:: fmt:: Formatter <' _>) -> core:: fmt:: Result {
501
- core:: fmt:: Debug :: fmt( & self . read( ) , f)
502
- }
503
- }
504
- } ) ;
505
489
} else if !access. can_read ( ) || register. read_action . is_some ( ) {
506
490
r_debug_impl. extend ( quote ! {
507
491
#debug_feature
0 commit comments