diff options
author | Miguel Ojeda <ojeda@kernel.org> | 2025-05-26 17:29:14 +0200 |
---|---|---|
committer | Benno Lossin <lossin@kernel.org> | 2025-06-11 21:13:57 +0200 |
commit | f744a5b68eead2cc73691e91182522c7d800245e (patch) | |
tree | 94cada1ffd8d4183c876fb5ca86487c6068efb8c /rust/kernel/init.rs | |
parent | d2b7313fa21bbe7ce3c4147d84c1ccbc6d69b9db (diff) |
rust: init: remove doctest's `Error::from_errno` workaround
Since commit 5ed147473458 ("rust: error: make conversion functions
public"), `Error::from_errno` is public.
Thus remove the workaround added in commit a30e94c29673 ("rust: init:
make doctests compilable/testable").
Suggested-by: Benno Lossin <lossin@kernel.org>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Link: https://lore.kernel.org/all/20250526152914.2453949-2-ojeda@kernel.org
Signed-off-by: Benno Lossin <lossin@kernel.org>
Diffstat (limited to 'rust/kernel/init.rs')
-rw-r--r-- | rust/kernel/init.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs index 49b949720886..49a61fa3dee8 100644 --- a/rust/kernel/init.rs +++ b/rust/kernel/init.rs @@ -77,14 +77,6 @@ //! # pub unsafe fn destroy_foo(_ptr: *mut foo) {} //! # pub unsafe fn enable_foo(_ptr: *mut foo, _flags: u32) -> i32 { 0 } //! # } -//! # // `Error::from_errno` is `pub(crate)` in the `kernel` crate, thus provide a workaround. -//! # trait FromErrno { -//! # fn from_errno(errno: core::ffi::c_int) -> Error { -//! # // Dummy error that can be constructed outside the `kernel` crate. -//! # Error::from(core::fmt::Error) -//! # } -//! # } -//! # impl FromErrno for Error {} //! /// # Invariants //! /// //! /// `foo` is always initialized |