Update syn to 2.0.110 (#8563)

#8547


  We are currently using an older version of `syn` in `test_random_derive`. Updating this removes one of the sources of `syn` `1.0.109` in our dependency tree.


Co-Authored-By: Mac L <mjladson@pm.me>

Co-Authored-By: Michael Sproul <michaelsproul@users.noreply.github.com>
This commit is contained in:
Mac L
2025-12-15 07:20:12 +04:00
committed by GitHub
parent 6a3a32515f
commit 32f7615cc8
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View File

@@ -8920,7 +8920,7 @@ name = "test_random_derive"
version = "0.2.0"
dependencies = [
"quote",
"syn 1.0.109",
"syn 2.0.110",
]
[[package]]

View File

@@ -238,7 +238,7 @@ store = { path = "beacon_node/store" }
strum = { version = "0.27", features = ["derive"] }
superstruct = "0.10"
swap_or_not_shuffle = { path = "consensus/swap_or_not_shuffle" }
syn = "1"
syn = "2"
sysinfo = "0.26"
system_health = { path = "common/system_health" }
task_executor = { path = "common/task_executor" }

View File

@@ -8,7 +8,8 @@ use syn::{DeriveInput, parse_macro_input};
/// The field attribute is: `#[test_random(default)]`
fn should_use_default(field: &syn::Field) -> bool {
field.attrs.iter().any(|attr| {
attr.path.is_ident("test_random") && attr.tokens.to_string().replace(' ', "") == "(default)"
attr.path().is_ident("test_random")
&& matches!(&attr.meta, syn::Meta::List(list) if list.tokens.to_string().replace(' ', "") == "default")
})
}