]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
rust: pin-init: bump minimum Rust version to 1.82
authorGary Guo <gary@garyguo.net>
Tue, 28 Apr 2026 13:10:51 +0000 (14:10 +0100)
committerGary Guo <gary@garyguo.net>
Sun, 10 May 2026 21:58:33 +0000 (22:58 +0100)
Following the kernel minimum version bump in commit f32fb9c58a5b ("rust:
bump Rust minimum supported version to 1.85.0 (Debian Trixie)"), bump
pin-init's minimum Rust version to 1.82.

This removes the `lint_reasons` feature which is stabilized in 1.81 and the
`raw_ref_ops` and `new_uninit` features which are stabilized in 1.82.

Given we do not use any features that are stabilized in 1.82..=1.85 range,
and pin-init crate is useful for other projects which may have their own
MSRV requirements, the minimum version is not straightly bumped to 1.85.

Reviewed-by: Benno Lossin <lossin@kernel.org>
Link: https://patch.msgid.link/20260428-pin-init-sync-v1-2-07f9bd3859fb@garyguo.net
Signed-off-by: Gary Guo <gary@garyguo.net>
rust/pin-init/examples/big_struct_in_place.rs
rust/pin-init/examples/linked_list.rs
rust/pin-init/examples/mutex.rs
rust/pin-init/examples/pthread_mutex.rs
rust/pin-init/examples/static_init.rs
rust/pin-init/internal/src/lib.rs
rust/pin-init/src/lib.rs

index 80f89b5f8fd60f8d2d1ac6c1ff738b3660721771..c05139927486de92f886b22c7ce5c24543cd80e2 100644 (file)
@@ -1,8 +1,5 @@
 // SPDX-License-Identifier: Apache-2.0 OR MIT
 
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))]
-
 use pin_init::*;
 
 // Struct with size over 1GiB
index 119169e4dc41c8f1bae9b67ef4c625c916b0e689..424585fe226d232519473dbf3f0dfdfec3210f48 100644 (file)
@@ -2,8 +2,6 @@
 
 #![allow(clippy::undocumented_unsafe_blocks)]
 #![cfg_attr(feature = "alloc", feature(allocator_api))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))]
 
 use core::{
     cell::Cell,
index d53671f0edb89cc00aaab391836a7a31fa1c3517..8ed2d3219eb13f3b69f50f713a3412567de27b35 100644 (file)
@@ -2,8 +2,6 @@
 
 #![allow(clippy::undocumented_unsafe_blocks)]
 #![cfg_attr(feature = "alloc", feature(allocator_api))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))]
 #![allow(clippy::missing_safety_doc)]
 
 use core::{
index f3b5cc9b71348eb50567c3b2b14fdab762ca9b6b..4a66316471af7a0f1017c6e0fb29203764969a1e 100644 (file)
@@ -3,8 +3,6 @@
 // inspired by <https://github.com/nbdd0121/pin-init/blob/trunk/examples/pthread_mutex.rs>
 #![allow(clippy::undocumented_unsafe_blocks)]
 #![cfg_attr(feature = "alloc", feature(allocator_api))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))]
 
 #[cfg(not(windows))]
 mod pthread_mtx {
index f7e53d1a5ae633c33bb33763e8c4cff5170daa1f..906b96c5d4b95b699ff824fcb6cd063a23c6899d 100644 (file)
@@ -2,8 +2,6 @@
 
 #![allow(clippy::undocumented_unsafe_blocks)]
 #![cfg_attr(feature = "alloc", feature(allocator_api))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))]
 #![allow(unused_imports)]
 
 use core::{
index b08dfe003031700130911459ac7de66f7c59768e..60d5093f3128e7c1dc103bb3ce39578b6dac0c0e 100644 (file)
@@ -6,7 +6,6 @@
 
 //! `pin-init` proc macros.
 
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
 // Documentation is done in the pin-init crate instead.
 #![allow(missing_docs)]
 
index 64eec095c859c06cd422672fe880b7adfd062582..4f50994bd2687ec787fe3c5c5c63a08bec9e2627 100644 (file)
 //! [`impl Init<T, E>`]: crate::Init
 //! [Rust-for-Linux]: https://rust-for-linux.com/
 
-#![cfg_attr(USE_RUSTC_FEATURES, feature(lint_reasons))]
-#![cfg_attr(USE_RUSTC_FEATURES, feature(raw_ref_op))]
-#![cfg_attr(
-    all(any(feature = "alloc", feature = "std"), USE_RUSTC_FEATURES),
-    feature(new_uninit)
-)]
 #![forbid(missing_docs, unsafe_op_in_unsafe_fn)]
 #![cfg_attr(not(feature = "std"), no_std)]
 #![cfg_attr(feature = "alloc", feature(allocator_api))]