Upgrade to syn 2.0 (#875)

* WIP updating to syn 2.0.0

* WIP darling compat

* Update darling and syn workspace deps

* NestedMeta::parse_meta_list

* Rename attribute keyword type property to path

* Fmt

* Update more type to path

* Unused darling

* Cargo.lock

* Add missing syn features
This commit is contained in:
Andrew Jones
2023-05-03 13:14:27 +01:00
committed by GitHub
parent fd046b0eaf
commit f4eb80e78d
8 changed files with 79 additions and 41 deletions
+1 -2
View File
@@ -11,7 +11,6 @@ mod type_def;
mod type_def_params;
mod type_path;
use darling::FromMeta;
use proc_macro2::{Ident, Span, TokenStream};
use quote::{quote, ToTokens};
use scale_info::{form::PortableForm, PortableRegistry, Type, TypeDef};
@@ -353,7 +352,7 @@ impl ToTokens for CratePath {
impl From<&str> for CratePath {
fn from(crate_path: &str) -> Self {
Self(syn::Path::from_string(crate_path).unwrap_or_else(|err| {
Self(syn::parse_str(crate_path).unwrap_or_else(|err| {
panic!("failed converting {crate_path:?} to `syn::Path`: {err:?}");
}))
}