From 08fcf990e17fe4b282012e249d6dd3e94c908d98 Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Wed, 25 Jun 2025 23:04:39 +0800 Subject: [PATCH 1/3] Satisfy new mismatched-lifetime-syntaxes lint --- impl/src/fmt/parsing.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/impl/src/fmt/parsing.rs b/impl/src/fmt/parsing.rs index ff4fbd0d..49ee07f0 100644 --- a/impl/src/fmt/parsing.rs +++ b/impl/src/fmt/parsing.rs @@ -280,7 +280,7 @@ pub(crate) fn format(input: &str) -> Option<(LeftToParse<'_>, Format<'_>)> { /// ``` /// /// [0]: std::fmt#syntax -fn argument(input: &str) -> Option<(LeftToParse<'_>, Argument)> { +fn argument(input: &str) -> Option<(LeftToParse<'_>, Argument<'_>)> { alt(&mut [ &mut map(identifier, |(i, ident)| (i, Argument::Identifier(ident))), &mut map(integer, |(i, int)| (i, Argument::Integer(int))), From 8b44750f82fd8284898a37896f67e53529a8c41a Mon Sep 17 00:00:00 2001 From: Kien Dang Date: Wed, 25 Jun 2025 23:35:05 +0800 Subject: [PATCH 2/3] Fix dead_code warnings --- tests/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/lib.rs b/tests/lib.rs index c6c2bafa..d2a492f8 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -93,6 +93,7 @@ struct NormalStruct { #[derive(From)] #[derive(Debug, Eq, PartialEq)] +#[allow(dead_code)] struct NestedInt(MyInt); #[derive(Debug, Eq, PartialEq)] @@ -281,6 +282,9 @@ fn main() { myint2 *= MyInt2(4); assert_eq!(MyInt2(32), myint2); + let foo = Foo; + let _bar: Bar = foo.into(); + let mut boxed = MyBoxedInt(Box::new(5)); assert_eq!(5, *boxed); *boxed = 7; From f59758ca50db4f292bcdf28e7640ffcc875fc343 Mon Sep 17 00:00:00 2001 From: tyranron Date: Wed, 25 Jun 2025 19:49:14 +0300 Subject: [PATCH 3/3] Small fix --- tests/lib.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/lib.rs b/tests/lib.rs index d2a492f8..4899ae56 100644 --- a/tests/lib.rs +++ b/tests/lib.rs @@ -1,4 +1,5 @@ #![cfg_attr(not(feature = "std"), no_std)] +#![allow(dead_code)] // some code is tested for type checking only #[cfg(not(feature = "std"))] #[macro_use] @@ -93,7 +94,6 @@ struct NormalStruct { #[derive(From)] #[derive(Debug, Eq, PartialEq)] -#[allow(dead_code)] struct NestedInt(MyInt); #[derive(Debug, Eq, PartialEq)] @@ -282,9 +282,6 @@ fn main() { myint2 *= MyInt2(4); assert_eq!(MyInt2(32), myint2); - let foo = Foo; - let _bar: Bar = foo.into(); - let mut boxed = MyBoxedInt(Box::new(5)); assert_eq!(5, *boxed); *boxed = 7;