Linux driver-core infrastructure
 help / color / mirror / Atom feed
* [PATCH] rust: doc: mark `Io` as notable trait
@ 2026-10-19 11:48 Gary Guo
  2026-10-19 12:28 ` Miguel Ojeda
  0 siblings, 1 reply; 3+ messages in thread
From: Gary Guo @ 2026-10-19 11:48 UTC (permalink / raw)
  To: Danilo Krummrich, Alice Ryhl, Daniel Almeida, Miguel Ojeda,
	Boqun Feng, Gary Guo, Björn Roy Baron, Benno Lossin,
	Andreas Hindborg, Trevor Gross, Tamir Duberstein,
	Alexandre Courbot, Onur Özkan
  Cc: driver-core, rust-for-linux, linux-kernel

From: Gary Guo <gary@garyguo.net>

`Io` trait is the primary way of interacting with a bunch of types, e.g.
`Mmio` and `Coherent`. It is hidden in "blanket impl" section which is not
very discoverable.

Use nightly feature to mark `Io` as a notable trait, so it is highlighted
at the top of the rustdoc page.

Signed-off-by: Gary Guo <gary@garyguo.net>
---
 rust/kernel/io.rs  | 1 +
 rust/kernel/lib.rs | 3 +++
 2 files changed, 4 insertions(+)

diff --git a/rust/kernel/io.rs b/rust/kernel/io.rs
index a877df11a03e..377c95dda04b 100644
--- a/rust/kernel/io.rs
+++ b/rust/kernel/io.rs
@@ -486,6 +486,7 @@ pub trait IoBase<'a>: Copy {
 /// - Fallible (runtime checked) accessors for different data widths
 ///
 /// Which I/O methods are available depends on the associated [`IoBackend`] implementation.
+#[doc(notable_trait)]
 pub trait Io<'a>: IoBase<'a> {
     /// Returns the size of this I/O region.
     #[inline]
diff --git a/rust/kernel/lib.rs b/rust/kernel/lib.rs
index 1ab41129d557..f7f720b9888a 100644
--- a/rust/kernel/lib.rs
+++ b/rust/kernel/lib.rs
@@ -29,6 +29,9 @@
 // To be determined.
 #![feature(used_with_arg)]
 //
+// For documentation purpose only.
+#![feature(doc_notable_trait)]
+//
 // `feature(file_with_nul)` is stable since Rust 1.92.0. Before Rust 1.89.0, it did not exist, so
 // enable it conditionally.
 #![cfg_attr(CONFIG_RUSTC_HAS_FILE_WITH_NUL, feature(file_with_nul))]

base-commit: d419d682257d813f6cb7a28e42b35d0edf4ad038
-- 
2.54.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-19 12:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-19 11:48 [PATCH] rust: doc: mark `Io` as notable trait Gary Guo
2026-10-19 12:28 ` Miguel Ojeda
2026-10-19 12:35   ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox