summaryrefslogtreecommitdiff
path: root/rust/pin-init/examples/pthread_mutex.rs
diff options
context:
space:
mode:
authorBenno Lossin <benno.lossin@proton.me>2025-04-14 20:00:31 +0000
committerBenno Lossin <benno.lossin@proton.me>2025-04-21 23:19:22 +0200
commit39051adb070432b283e6c11b2b24937281b9f97f (patch)
tree9f6f79e52a25d4a00bd7d922507aa4fbbf39f1b9 /rust/pin-init/examples/pthread_mutex.rs
parent5c4167b4056c9db951788541e23585dd4a1fa426 (diff)
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 Link: https://lore.kernel.org/all/20250414195928.129040-4-benno.lossin@proton.me Signed-off-by: Benno Lossin <benno.lossin@proton.me>
Diffstat (limited to 'rust/pin-init/examples/pthread_mutex.rs')
-rw-r--r--rust/pin-init/examples/pthread_mutex.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/pin-init/examples/pthread_mutex.rs b/rust/pin-init/examples/pthread_mutex.rs
index 074ebf485a97..5acc5108b954 100644
--- a/rust/pin-init/examples/pthread_mutex.rs
+++ b/rust/pin-init/examples/pthread_mutex.rs
@@ -42,7 +42,7 @@ mod pthread_mtx {
#[derive(Debug)]
pub enum Error {
- #[expect(dead_code)]
+ #[allow(dead_code)]
IO(std::io::Error),
Alloc,
}