rust: prelude: re-export `core::mem::{align,size}_of{,_val}`
Miguel Ojeda
maintainerPATCH 1/1 rust: prelude: re-export `core::mem::{align,size}_of{,_val}`
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_val
from core::mem to the prelude [1].
For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
--- rust/kernel/prelude.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
rust/kernel/prelude.rs +4 -1
@@ -12,7 +12,10 @@//! ``` #[doc(no_inline)] -pub use core::pin::Pin ; +pub use core::{ + mem::{align_of, align_of_val, size_of, size_of_val}, + pin::Pin , +};pub use ::ffi::{ c_char, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint, c_ulong, c_ulonglong,
base-commit: dff64b072708ffef23c117fa1ee1ea59eb417807
Signature · 1 line
2.50.1
Quoted 38 lines · Miguel Ojeda
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_valfrom
core::memto the prelude [1].For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
Link https://lore.kernel.org/rust-for-linux/CANiq72kOLYR2A95o0ji2mDmEqOKh9e9_60zZKmgF=vZmsW6DRg@mail.gmail.com/ [2] open hereSigned-off-by Miguel Ojeda <[email protected]>--- rust/kernel/prelude.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)rust/kernel/prelude.rs +4
-1@@ -12,7 +12,10 @@//! ``` #[doc(no_inline)] -pub use core::pin::Pin ; +pub use core::{ + mem::{align_of, align_of_val, size_of, size_of_val}, + pin::Pin , +};pub use ::ffi::{ c_char, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint, c_ulong, c_ulonglong,
Quoted 4 lines
base-commit:
dff64b072708ffef23c117fa1ee1ea59eb417807--
2.50.1
Quoted 41 lines · Miguel Ojeda
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_valfrom
core::memto the prelude [1].For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
Link https://lore.kernel.org/rust-for-linux/CANiq72kOLYR2A95o0ji2mDmEqOKh9e9_60zZKmgF=vZmsW6DRg@mail.gmail.com/ [2] open hereSigned-off-by Miguel Ojeda <[email protected]>---
rust/kernel/prelude.rs| 5 ++++-1 file changed, 4 insertions(+), 1 deletion(-)rust/kernel/prelude.rs +4
-1@@ -12,7 +12,10 @@//! ``` #[doc(no_inline)] -pub use core::pin::Pin ; +pub use core::{ + mem::{align_of, align_of_val, size_of, size_of_val}, + pin::Pin , +};pub use ::ffi::{ c_char, c_int, c_long, c_longlong, c_schar, c_short, c_uchar, c_uint, c_ulong, c_ulonglong,
Quoted 5 lines
base-commit:
dff64b072708ffef23c117fa1ee1ea59eb417807Signature · 1 line
2.50.1
Quoted 9 lines · Miguel Ojeda
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_valfrom
core::memto the prelude [1].
Quoted 7 lines
For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
---
Cheers,
Benno
Quoted 3 lines
--- rust/kernel/prelude.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
Quoted 9 lines · Miguel Ojeda
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_valfrom
core::memto the prelude [1].
Quoted 7 lines
For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
Nice to have these more readily accessible!
Quoted 9 lines · Miguel Ojeda
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_valfrom
core::memto the prelude [1].
Quoted 7 lines
For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
Best regards,
Andreas Hindborg
Miguel Ojeda
AppliedQuoted 10 lines · Miguel Ojeda
Rust 1.80.0 added:
align_of
align_of_val
size_of
size_of_valfrom
core::memto the prelude [1].
Quoted 7 lines
For similar reasons, and to minimize potential confusion when code may work in later versions but not in our current minimum, add it to our prelude too.
Applied to rust-next -- thanks everyone!
Cheers,
Miguel