mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-06 00:58:02 +00:00
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:
@@ -13,7 +13,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
|
||||
[dependencies]
|
||||
proc-macro-crate = "1.1.3"
|
||||
proc-macro2 = "1.0.37"
|
||||
quote = "1.0.10"
|
||||
syn = { version = "1.0.98", features = ["full", "visit", "extra-traits"] }
|
||||
proc-macro2 = "1.0.56"
|
||||
quote = "1.0.26"
|
||||
syn = { version = "2.0.14", features = ["full", "visit", "extra-traits"] }
|
||||
frame-support-procedural-tools-derive = { version = "3.0.0", path = "./derive" }
|
||||
|
||||
@@ -15,6 +15,6 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
proc-macro = true
|
||||
|
||||
[dependencies]
|
||||
proc-macro2 = "1.0.37"
|
||||
quote = { version = "1.0.10", features = ["proc-macro"] }
|
||||
syn = { version = "1.0.98", features = ["proc-macro", "full", "extra-traits", "parsing"] }
|
||||
proc-macro2 = "1.0.56"
|
||||
quote = { version = "1.0.26", features = ["proc-macro"] }
|
||||
syn = { version = "2.0.14", features = ["proc-macro", "full", "extra-traits", "parsing"] }
|
||||
|
||||
@@ -102,16 +102,15 @@ pub fn clean_type_string(input: &str) -> String {
|
||||
}
|
||||
|
||||
/// Return all doc attributes literals found.
|
||||
pub fn get_doc_literals(attrs: &[syn::Attribute]) -> Vec<syn::Lit> {
|
||||
pub fn get_doc_literals(attrs: &[syn::Attribute]) -> Vec<syn::Expr> {
|
||||
attrs
|
||||
.iter()
|
||||
.filter_map(|attr| {
|
||||
if let Ok(syn::Meta::NameValue(meta)) = attr.parse_meta() {
|
||||
if meta.path.get_ident().map_or(false, |ident| ident == "doc") {
|
||||
Some(meta.lit)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
if let syn::Meta::NameValue(meta) = &attr.meta {
|
||||
meta.path
|
||||
.get_ident()
|
||||
.filter(|ident| *ident == "doc")
|
||||
.map(|_| meta.value.clone())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user