From: Gary Guo <gary@kernel.org>
To: "Benno Lossin" <lossin@kernel.org>,
"Miguel Ojeda" <ojeda@kernel.org>,
"Boqun Feng" <boqun@kernel.org>,
"Björn Roy Baron" <bjorn3_gh@protonmail.com>,
"Andreas Hindborg" <a.hindborg@kernel.org>,
"Alice Ryhl" <aliceryhl@google.com>,
"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>
Cc: rust-for-linux@vger.kernel.org, linux-kernel@vger.kernel.org,
Gary Guo <gary@garyguo.net>
Subject: [PATCH 1/3] rust: pin-init: internal: allow `clippy::large_unopt_stack_frames`
Date: Wed, 18 Nov 2026 14:31:20 +0000 [thread overview]
Message-ID: <20261118-dev-project-vis-v1-1-2a5f433bb516@garyguo.net> (raw)
In-Reply-To: <20261118-dev-project-vis-v1-0-2a5f433bb516@garyguo.net>
From: Gary Guo <gary@garyguo.net>
Since Rust 1.102, Clippy renames `large_stack_frames` to
`large_unopt_stack_frames` and make it warn by default. This is a good
thing as in such cases pin-init should be used rather than potentially
leave unoptimized large moves on stack. However, this also triggers in
unexecutable code paths that pin-init generates for field duplication and
exhaustiveness checks. Allow it on the generated check closure.
Signed-off-by: Gary Guo <gary@garyguo.net>
---
rust/pin-init/internal/src/init.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/pin-init/internal/src/init.rs b/rust/pin-init/internal/src/init.rs
index ded2b5283376..c78f8d3ca309 100644
--- a/rust/pin-init/internal/src/init.rs
+++ b/rust/pin-init/internal/src/init.rs
@@ -572,7 +572,7 @@ fn make_field_check(
};
quote_spanned! { Span::mixed_site() =>
- #[allow(unreachable_code)]
+ #[allow(unreachable_code, clippy::large_unopt_stack_frames)]
// We use unreachable code to perform field checks. They're still checked by the compiler.
// SAFETY: this code is never executed.
let _ = || unsafe {
--
2.54.0
next prev parent reply other threads:[~2026-11-18 14:31 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 14:31 [PATCH 0/3] rust: pin-init: reduce visibility of projection methods to declutter rustdoc Gary Guo
2026-11-18 14:31 ` Gary Guo [this message]
2026-11-18 14:31 ` [PATCH 2/3] rust: pin-init: internal: use visibility of the most visible field for projection Gary Guo
2026-11-18 14:31 ` [PATCH 3/3] rust: pin-init: internal: hide `HasPinData` impl 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=20261118-dev-project-vis-v1-1-2a5f433bb516@garyguo.net \
--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=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
all inboxes | Powered by JetHome®