[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72kYYu9C94aY72HK1ELSmvktF3nq+G4+smdAW_Xaxw1kqw@mail.gmail.com>
Date: Tue, 4 Nov 2025 20:06:41 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Guillaume Gomez <guillaume1.gomez@...il.com>
Cc: Alexandre Courbot <acourbot@...dia.com>, Joel Fernandes <joelagnelf@...dia.com>,
linux-kernel@...r.kernel.org, rust-for-linux@...r.kernel.org,
dri-devel@...ts.freedesktop.org, dakr@...nel.org,
David Airlie <airlied@...il.com>, Alistair Popple <apopple@...dia.com>, Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>,
Gary Guo <gary@...yguo.net>, bjorn3_gh@...tonmail.com,
Benno Lossin <lossin@...nel.org>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Simona Vetter <simona@...ll.ch>, Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
John Hubbard <jhubbard@...dia.com>, Timur Tabi <ttabi@...dia.com>, joel@...lfernandes.org,
Elle Rhumsaa <elle@...thered-steel.dev>, Daniel Almeida <daniel.almeida@...labora.com>,
Andrea Righi <arighi@...dia.com>, Philipp Stanner <phasta@...nel.org>, nouveau@...ts.freedesktop.org,
Nouveau <nouveau-bounces@...ts.freedesktop.org>
Subject: Re: [PATCH RFC 1/4] rust: clist: Add abstraction for iterating over C
linked lists
On Tue, Nov 4, 2025 at 7:35 PM Miguel Ojeda
<miguel.ojeda.sandonis@...il.com> wrote:
>
> Orthogonally, the script that generates the doctests could perhaps
> help to automate some of that. For instance, we could have a way to
> specify an "environment" for a given Rust file or Rust `mod` or
> similar, and then every doctests would have the code prefixed to them.
I guess this could probably best generalized as "tagging" doctests
with custom tags that `rustdoc` just forwards in the generated JSON.
Something like:
/// ```tag:foo,tag:bar
would give us a:
"tags": ["foo", "bar"]
in the JSON. Then a custom generator like the one we have could do
whatever it needs with it, including prepending code or other things.
Now, I see there is already an `unknown` field in the attributes which
already give us the unrecognized ones, which is great and we could
potentially use that.
However, should there be a particular way/namespace we should create
our custom tags so that we don't conflict in the future with `rustdoc`
ones?
I have added it to the usual list:
https://github.com/Rust-for-Linux/linux/issues/350
(There is also the question about supporting the old non-JSON way for
things like this, but I am ignoring that for now)
Cheers,
Miguel
Powered by blists - more mailing lists