[PATCH 4/4] rust: pin-init: remove `__pinned_init` method for `cfg(kernel)`

From: Gary Guo

Date: Wed Jul 22 2026 - 14:52:14 EST


Remove `__pinned_init` for kernel configuration, with all users gone.
Still perserve it temporarily as deprecated so other users have time to
move off it.

Signed-off-by: Gary Guo <gary@xxxxxxxxxxx>
---
rust/pin-init/src/lib.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/rust/pin-init/src/lib.rs b/rust/pin-init/src/lib.rs
index 354fbefcf80e..c8c1d0184da4 100644
--- a/rust/pin-init/src/lib.rs
+++ b/rust/pin-init/src/lib.rs
@@ -917,7 +917,8 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {
///
/// Same as `__init`.
#[inline(always)]
- #[cfg_attr(not(kernel), deprecated = "use `__init` instead")]
+ #[cfg(not(kernel))]
+ #[deprecated = "use `__init` instead"]
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> {
// SAFETY: Per safety requirement.
unsafe { self.__init(slot) }

--
2.54.0