[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250709-init-remove-old-workaround-v2-1-a3b1be8fd490@gmail.com>
Date: Wed, 09 Jul 2025 18:49:34 -0400
From: Tamir Duberstein <tamird@...il.com>
To: Benno Lossin <lossin@...nel.org>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>,
Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org,
Tamir Duberstein <tamird@...il.com>
Subject: [PATCH v2 1/2] rust: init: compile examples
It's not exactly clear to me why these were `ignore`d. There are many
others like this in pin-init, but I'm only touching the kernel-specific
ones here.
Signed-off-by: Tamir Duberstein <tamird@...il.com>
---
rust/kernel/init.rs | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/rust/kernel/init.rs b/rust/kernel/init.rs
index 8d228c237954..f8402c818d30 100644
--- a/rust/kernel/init.rs
+++ b/rust/kernel/init.rs
@@ -29,15 +29,16 @@
//!
//! ## General Examples
//!
-//! ```rust,ignore
+//! ```rust
//! # #![allow(clippy::disallowed_names)]
+//! # #![allow(clippy::undocumented_unsafe_blocks)]
//! use kernel::types::Opaque;
//! use pin_init::pin_init_from_closure;
//!
//! // assume we have some `raw_foo` type in C:
//! #[repr(C)]
//! struct RawFoo([u8; 16]);
-//! extern {
+//! extern "C" {
//! fn init_foo(_: *mut RawFoo);
//! }
//!
@@ -66,12 +67,13 @@
//! });
//! ```
//!
-//! ```rust,ignore
+//! ```rust
//! # #![allow(unreachable_pub, clippy::disallowed_names)]
//! use kernel::{prelude::*, types::Opaque};
//! use core::{ptr::addr_of_mut, marker::PhantomPinned, pin::Pin};
//! # mod bindings {
//! # #![allow(non_camel_case_types)]
+//! # #![allow(clippy::missing_safety_doc)]
//! # pub struct foo;
//! # pub unsafe fn init_foo(_ptr: *mut foo) {}
//! # pub unsafe fn destroy_foo(_ptr: *mut foo) {}
--
2.50.0
Powered by blists - more mailing lists