@@ -30,7 +30,7 @@ const fn size_align<T>() -> (usize, usize) {
30
30
#[ lang = "alloc_layout" ]
31
31
pub struct Layout {
32
32
// size of the requested block of memory, measured in bytes.
33
- size_ : usize ,
33
+ size : usize ,
34
34
35
35
// alignment of the requested block of memory, measured in bytes.
36
36
// we ensure that this is always a power-of-two, because API's
@@ -39,7 +39,7 @@ pub struct Layout {
39
39
//
40
40
// (However, we do not analogously require `align >= sizeof(void*)`,
41
41
// even though that is *also* a requirement of `posix_memalign`.)
42
- align_ : ValidAlign ,
42
+ align : ValidAlign ,
43
43
}
44
44
45
45
impl Layout {
@@ -97,7 +97,7 @@ impl Layout {
97
97
#[ inline]
98
98
pub const unsafe fn from_size_align_unchecked ( size : usize , align : usize ) -> Self {
99
99
// SAFETY: the caller must ensure that `align` is a power of two.
100
- Layout { size_ : size, align_ : unsafe { ValidAlign :: new_unchecked ( align) } }
100
+ Layout { size, align : unsafe { ValidAlign :: new_unchecked ( align) } }
101
101
}
102
102
103
103
/// The minimum size in bytes for a memory block of this layout.
@@ -106,7 +106,7 @@ impl Layout {
106
106
#[ must_use]
107
107
#[ inline]
108
108
pub const fn size ( & self ) -> usize {
109
- self . size_
109
+ self . size
110
110
}
111
111
112
112
/// The minimum byte alignment for a memory block of this layout.
@@ -116,7 +116,7 @@ impl Layout {
116
116
without modifying the layout"]
117
117
#[ inline]
118
118
pub const fn align ( & self ) -> usize {
119
- self . align_ . as_nonzero ( ) . get ( )
119
+ self . align . as_nonzero ( ) . get ( )
120
120
}
121
121
122
122
/// Constructs a `Layout` suitable for holding a value of type `T`.
0 commit comments