rust: pin-init: remove __pinned_init method for cfg(kernel)

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.

Link: https://patch.msgid.link/20260729-merge-init-v2-5-26adf47109e7@garyguo.net
Signed-off-by: Gary Guo <gary@garyguo.net>
This commit is contained in:
Gary Guo
2026-07-29 16:38:47 +01:00
parent ea7da31160
commit 1f7fa1374d

View File

@@ -917,7 +917,8 @@ pub unsafe trait PinInit<T: ?Sized, E = Infallible>: Sized {
///
/// Same as `__init`.
#[inline(always)]
#[cfg_attr(not(kernel), deprecated = "use `raw_try_init` instead")]
#[cfg(not(kernel))]
#[deprecated = "use `raw_try_init` instead"]
unsafe fn __pinned_init(self, slot: *mut T) -> Result<(), E> {
// SAFETY: Per safety requirement.
unsafe { self.__init(slot) }