File tree 1 file changed +3
-3
lines changed 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ impl Layout {
83
83
84
84
/// Returns the layout for `a` followed by `b` and the offset of `b`.
85
85
///
86
- /// This function was adapted from the currently unstable `Layout::extend()`:
86
+ /// This function was adapted from the `Layout::extend()`:
87
87
/// https://doc.rust-lang.org/nightly/std/alloc/struct.Layout.html#method.extend
88
88
#[ inline]
89
89
pub ( crate ) const fn extend ( self , other : Layout ) -> Option < ( Layout , usize ) > {
@@ -97,7 +97,7 @@ impl Layout {
97
97
// - align is 0 (implied false by is_power_of_two())
98
98
// - align is not a power of 2
99
99
// - size rounded up to align overflows
100
- if !new_align. is_power_of_two ( ) || new_size > core:: usize :: MAX - ( new_align - 1 ) {
100
+ if !new_align. is_power_of_two ( ) || new_size > core:: isize :: MAX as usize - ( new_align - 1 ) {
101
101
return None ;
102
102
}
103
103
@@ -107,7 +107,7 @@ impl Layout {
107
107
108
108
/// Returns the padding after `layout` that aligns the following address to `align`.
109
109
///
110
- /// This function was adapted from the currently unstable `Layout::padding_needed_for()`:
110
+ /// This function was adapted from the `Layout::padding_needed_for()`:
111
111
/// https://doc.rust-lang.org/nightly/std/alloc/struct.Layout.html#method.padding_needed_for
112
112
#[ inline]
113
113
pub ( crate ) const fn padding_needed_for ( self , align : usize ) -> usize {
You can’t perform that action at this time.
0 commit comments