[PATCH 3/3] rust: pin-init: examples: use `allow` instead of `expect`
From: Benno Lossin
Date: Mon Apr 14 2025 - 16:03:09 EST
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@xxxxxxxxx>
---
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