From: Alice Ryhl <aliceryhl@google.com>
To: Gary Guo <gary@kernel.org>
Cc: "Alice Ryhl" <aliceryhl@google.com>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Benno Lossin" <lossin@kernel.org>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Trevor Gross" <tmgross@umich.edu>,
"Danilo Krummrich" <dakr@kernel.org>,
"Daniel Almeida" <daniel.almeida@collabora.com>,
"Tamir Duberstein" <tamird@kernel.org>,
"Alexandre Courbot" <acourbot@nvidia.com>,
"Onur Özkan" <work@onurozkan.dev>,
rust-for-linux@vger.kernel.org, "Gary Guo" <gary@garyguo.net>
Subject: Re: [PATCH] rust: prelude: remove `size_of` and friends
Date: Mon, 30 Nov 2026 11:09:48 +0000 [thread overview]
Message-ID: <20261130110948.3390932-1-aliceryhl@google.com> (raw)
In-Reply-To: <20261128-dev-prelude-v1-1-c93babe3c9d6@garyguo.net>
On Sat, Nov 28, 2026 at 04:07:22PM +0000, Gary Guo wrote:
> `align_of`, `align_of_val`, `size_of` and `size_of_val` has been in the
> core prelude since Rust 1.80. As kernel's minimum Rust version is 1.85, the
> manual inclusion of these in the kernel prelude is no longer necessary,
> thus remove it.
>
> Signed-off-by: Gary Guo <gary@garyguo.net>
This patch introduces two `unused_imports` warnings, because these two
files only used `size_of` from the kernel prelude:
warning: unused import: `crate::prelude::*`
--> rust/kernel/num/casts.rs:44:5
|
44 | use crate::prelude::*;
| ^^^^^^^^^^^^^^^^^
warning: unused import: `prelude`
--> drivers/gpu/nova-core/num.rs:10:5
|
10 | prelude::*, //
| ^^^^^^^
Those two unused prelude imports will need to be removed as well.
Alice
next prev parent reply other threads:[~2026-11-30 11:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-28 16:07 [PATCH] rust: prelude: remove `size_of` and friends Gary Guo
2026-11-30 11:09 ` Alice Ryhl [this message]
2026-11-30 16:15 ` Miguel Ojeda
2026-11-30 16:39 ` Gary Guo
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=20261130110948.3390932-1-aliceryhl@google.com \
--to=aliceryhl@google.com \
--cc=a.hindborg@kernel.org \
--cc=acourbot@nvidia.com \
--cc=bjorn3_gh@protonmail.com \
--cc=boqun@kernel.org \
--cc=dakr@kernel.org \
--cc=daniel.almeida@collabora.com \
--cc=gary@garyguo.net \
--cc=gary@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