macros: upgrade syn to v3 (#8304)

This commit is contained in:
Paolo Barbolini
2026-07-26 11:26:19 +00:00
committed by GitHub
parent 818e2dd866
commit 6a058770e9
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -24,7 +24,7 @@ proc-macro = true
[dependencies] [dependencies]
proc-macro2 = "1.0.60" proc-macro2 = "1.0.60"
quote = "1" quote = "1"
syn = { version = "2.0", features = ["full"] } syn = { version = "3.0", features = ["full"] }
[dev-dependencies] [dev-dependencies]
tokio = { version = "1.0.0", features = ["full", "test-util"] } tokio = { version = "1.0.0", features = ["full", "test-util"] }
+1 -1
View File
@@ -326,7 +326,7 @@ fn contains_impl_trait(ty: &syn::Type) -> bool {
_ => false, _ => false,
}), }),
syn::PathArguments::Parenthesized(args) => { syn::PathArguments::Parenthesized(args) => {
args.inputs.iter().any(contains_impl_trait) args.inputs.iter().any(|arg| contains_impl_trait(&arg.ty))
|| matches!(&args.output, syn::ReturnType::Type(_, t) if contains_impl_trait(t)) || matches!(&args.output, syn::ReturnType::Type(_, t) if contains_impl_trait(t))
} }
syn::PathArguments::None => false, syn::PathArguments::None => false,