@@ -65,20 +65,20 @@ pub trait LayoutCalculator {
65
65
if !matches ! ( kind, StructKind :: MaybeUnsized ) {
66
66
if let Some ( niche) = layout. largest_niche {
67
67
let head_space = niche. offset . bytes ( ) ;
68
- let niche_length = niche. value . size ( dl) . bytes ( ) ;
69
- let tail_space = layout. size . bytes ( ) - head_space - niche_length ;
68
+ let niche_len = niche. value . size ( dl) . bytes ( ) ;
69
+ let tail_space = layout. size . bytes ( ) - head_space - niche_len ;
70
70
71
71
// This may end up doing redundant work if the niche is already in the last
72
72
// field (e.g. a trailing bool) and there is tail padding. But it's non-trivial
73
73
// to get the unpadded size so we try anyway.
74
74
if fields. len ( ) > 1 && head_space != 0 && tail_space > 0 {
75
75
let alt_layout = univariant ( self , dl, fields, repr, kind, NicheBias :: End )
76
76
. expect ( "alt layout should always work" ) ;
77
- let niche = alt_layout
77
+ let alt_niche = alt_layout
78
78
. largest_niche
79
79
. expect ( "alt layout should have a niche like the regular one" ) ;
80
- let alt_head_space = niche . offset . bytes ( ) ;
81
- let alt_niche_len = niche . value . size ( dl) . bytes ( ) ;
80
+ let alt_head_space = alt_niche . offset . bytes ( ) ;
81
+ let alt_niche_len = alt_niche . value . size ( dl) . bytes ( ) ;
82
82
let alt_tail_space =
83
83
alt_layout. size . bytes ( ) - alt_head_space - alt_niche_len;
84
84
@@ -93,7 +93,7 @@ pub trait LayoutCalculator {
93
93
alt_layout: {}\n ",
94
94
layout. size. bytes( ) ,
95
95
head_space,
96
- niche_length ,
96
+ niche_len ,
97
97
tail_space,
98
98
alt_head_space,
99
99
alt_niche_len,
0 commit comments