mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 19:53:15 -04:00
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:
@@ -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) }
|
||||
|
||||
Reference in New Issue
Block a user