[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20250414195928.129040-4-benno.lossin@proton.me>
Date: Mon, 14 Apr 2025 20:00:31 +0000
From: Benno Lossin <benno.lossin@...ton.me>
To: Benno Lossin <benno.lossin@...ton.me>, Miguel Ojeda <ojeda@...nel.org>, Alex Gaynor <alex.gaynor@...il.com>, Boqun Feng <boqun.feng@...il.com>, Gary Guo <gary@...yguo.net>, Björn Roy Baron <bjorn3_gh@...tonmail.com>, Andreas Hindborg <a.hindborg@...nel.org>, Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>, Danilo Krummrich <dakr@...nel.org>, Fiona Behrens <me@...enk.dev>
Cc: rust-for-linux@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/3] rust: pin-init: examples: use `allow` instead of `expect`
Rust 1.78 doesn't emit a `dead_code` error on the annotated element,
resulting in the `unfulfilled_lint_expectations` error. Rust 1.85 does
emit the `dead_code` error, so we still need an `allow`.
Link: https://github.com/Rust-for-Linux/pin-init/pull/33/commits/0e28cbb895bd29f896a59b40e8ed506ea7bef13c
Signed-off-by: Benno Lossin <benno.lossin@...ton.me>
---
rust/pin-init/examples/pthread_mutex.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/rust/pin-init/examples/pthread_mutex.rs b/rust/pin-init/examples/pthread_mutex.rs
index f020dd266506..e28a0bfd4179 100644
--- a/rust/pin-init/examples/pthread_mutex.rs
+++ b/rust/pin-init/examples/pthread_mutex.rs
@@ -42,7 +42,7 @@ fn drop(self: Pin<&mut Self>) {
#[derive(Debug)]
pub enum Error {
- #[expect(dead_code)]
+ #[allow(dead_code)]
IO(std::io::Error),
Alloc,
}
--
2.48.1
Powered by blists - more mailing lists