From 0f2338fa7c1a565b4f981db88442f45b0442c441 Mon Sep 17 00:00:00 2001 From: Wim Looman Date: Thu, 8 Feb 2024 12:25:16 +0100 Subject: [PATCH] Fix dead code warnings in tests https://github.com/rust-lang/rust/pull/118257 has improved the detection of unused traits --- tests/throws.rs | 1 + tests/try.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/tests/throws.rs b/tests/throws.rs index fe59f9e..8f57349 100644 --- a/tests/throws.rs +++ b/tests/throws.rs @@ -144,6 +144,7 @@ pub fn unreachable() { todo!() } +#[allow(dead_code)] trait Example { #[throws] fn foo() -> i32; diff --git a/tests/try.rs b/tests/try.rs index 7a526b2..4a9bbd4 100644 --- a/tests/try.rs +++ b/tests/try.rs @@ -141,6 +141,7 @@ pub fn unreachable() -> Result<(), i32> { todo!() } +#[allow(dead_code)] trait Example { #[try_fn] fn foo() -> Result;