Globally upgrade to syn 2.x and latest quote and proc_macro2 1x versions (#13846)

* globally upgrade quote to latest 1.0.x (1.0.26)

* globally upgrade syn to final 1.0.x version (1.0.109)

* globally upgrade proc-macro2 to 1.0.56

* upgrade to syn v2.0.13 and fix everything except NestedMeta

* fix parse nested metadata code in decl_runtime_apis.rs

* Port more stuff to syn 2.0

* Make the rest compile

* Ignore error

* update to syn 2.0.14

---------

Co-authored-by: Bastian Köcher <info@kchr.de>
This commit is contained in:
Sam Johnson
2023-04-12 14:42:22 -04:00
committed by GitHub
parent 03c99fe003
commit b83bf4784e
62 changed files with 402 additions and 478 deletions
@@ -15,9 +15,9 @@ targets = ["x86_64-unknown-linux-gnu"]
proc-macro = true
[dependencies]
syn = { version = "1.0.98", features = ["full", "visit"] }
quote = "1.0"
proc-macro2 = "1.0.37"
syn = { version = "2.0.14", features = ["full", "visit"] }
quote = "1.0.26"
proc-macro2 = "1.0.56"
proc-macro-crate = "1.1.3"
[dev-dependencies]
@@ -161,7 +161,7 @@ fn check_attributes(input: ParseStream) -> syn::Result<bool> {
return Ok(false)
}
let attr = attrs.pop().expect("attributes vec with len 1 can be popped.");
if attr.path.is_ident("compact") {
if attr.path().is_ident("compact") {
Ok(true)
} else {
Err(syn::Error::new_spanned(attr, "compact solution can accept only #[compact]"))
@@ -200,7 +200,7 @@ impl Parse for SolutionDef {
format!("Expected binding: `{} = ...`", expected),
))
},
syn::GenericArgument::Binding(syn::Binding { ident, ty, .. }) => {
syn::GenericArgument::AssocType(syn::AssocType { ident, ty, .. }) => {
// check that we have the right keyword for this position in the argument list
if ident == expected {
Ok(ty.clone())