mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2026-01-27 12:47:24 +01:00
rust: init: remove doctest's Error::from_errno workaround
Since commit5ed1474734("rust: error: make conversion functions public"), `Error::from_errno` is public. Thus remove the workaround added in commita30e94c296("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>
This commit is contained in:
parent
d2b7313fa2
commit
f744a5b68e
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user