From: Gary Guo <gary@kernel.org>
To: "Danilo Krummrich" <dakr@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>, "Gary Guo" <gary@garyguo.net>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>
Cc: driver-core@lists.linux.dev, rust-for-linux@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] rust: doc: mark `Io` as notable trait
Date: Mon, 19 Oct 2026 12:48:10 +0100 [thread overview]
Message-ID: <20261019114811.1105192-1-gary@kernel.org> (raw)
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
next reply other threads:[~2026-10-19 11:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-19 11:48 Gary Guo [this message]
2026-10-19 12:28 ` [PATCH] rust: doc: mark `Io` as notable trait Miguel Ojeda
2026-10-19 12:35 ` Miguel Ojeda
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261019114811.1105192-1-gary@kernel.org \
--to=gary@kernel.org \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=aliceryhl@google.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=driver-core@lists.linux.dev \
--cc=gary@garyguo.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lossin@kernel.org \
--cc=ojeda@kernel.org \
--cc=rust-for-linux@vger.kernel.org \
--cc=tamird@kernel.org \
--cc=tmgross@umich.edu \
--cc=work@onurozkan.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox