We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ArrayLayout
1 parent b160dc4 commit b7ed2b6Copy full SHA for b7ed2b6
rust/kernel/alloc/layout.rs
@@ -45,7 +45,7 @@ impl<T> ArrayLayout<T> {
45
/// When `len * size_of::<T>()` overflows or when `len * size_of::<T>() > isize::MAX`.
46
pub const fn new(len: usize) -> Result<Self, LayoutError> {
47
match len.checked_mul(core::mem::size_of::<T>()) {
48
- Some(len) if len <= ISIZE_MAX => {
+ Some(size) if size <= ISIZE_MAX => {
49
// INVARIANT: We checked above that `len * size_of::<T>() <= isize::MAX`.
50
Ok(Self {
51
len,
0 commit comments