File tree Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Expand file tree Collapse file tree 1 file changed +9
-11
lines changed Original file line number Diff line number Diff line change @@ -444,22 +444,20 @@ fn register_or_cluster_block_nightly(
444
444
// We need to compute the idents of each register/union block first to make sure no conflicts exists.
445
445
regions. resolve_idents ( ) ?;
446
446
// The end of the region from the prior iteration of the loop
447
- let mut last_end = None ;
447
+ let mut last_end = 0 ;
448
448
449
449
for ( i, region) in regions. regions . iter ( ) . enumerate ( ) {
450
450
// Check if we need padding
451
- if let Some ( end) = last_end {
452
- let pad = region. offset - end;
453
- if pad != 0 {
454
- let name = Ident :: new ( format ! ( "_reserved{}" , i) ) ;
455
- let pad = pad as usize ;
456
- fields. append ( quote ! {
457
- #name : [ u8 ; #pad] ,
458
- } ) ;
459
- }
451
+ let pad = region. offset - last_end;
452
+ if pad != 0 {
453
+ let name = Ident :: new ( format ! ( "_reserved{}" , i) ) ;
454
+ let pad = pad as usize ;
455
+ fields. append ( quote ! {
456
+ #name : [ u8 ; #pad] ,
457
+ } ) ;
460
458
}
461
459
462
- last_end = Some ( region. end ) ;
460
+ last_end = region. end ;
463
461
464
462
let mut region_fields = Tokens :: new ( ) ;
465
463
You can’t perform that action at this time.
0 commit comments