Skip to content

Commit

Permalink
Merge pull request #3 from SOF3/dependabot/cargo/syn-2.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
dependabot[bot] authored Mar 21, 2023
2 parents 3c42e39 + 8aaaaad commit 497f500
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion codegen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ proc-macro = true
[dependencies]
proc-macro2 = "1.0.32"
quote = "1.0.10"
syn = {version = "1.0.81", features = ["parsing", "full"]}
syn = {version = "2.0.4", features = ["parsing", "full"]}
8 changes: 4 additions & 4 deletions codegen/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ fn xylem_impl(ts: TokenStream) -> Result<Output> {
let mut processable = false;

for attr in &input.attrs {
if attr.path.is_ident("xylem") {
if attr.path().is_ident("xylem") {
let attr_list: Punctuated<InputAttr, syn::Token![,]> =
attr.parse_args_with(Punctuated::parse_terminated)?;
for attr in attr_list {
Expand Down Expand Up @@ -69,7 +69,7 @@ fn xylem_impl(ts: TokenStream) -> Result<Output> {
.iter()
.map(|param| match param {
syn::GenericParam::Type(syn::TypeParam { ident, .. }) => quote!(#ident),
syn::GenericParam::Lifetime(syn::LifetimeDef { lifetime, .. }) => {
syn::GenericParam::Lifetime(syn::LifetimeParam { lifetime, .. }) => {
quote!(#lifetime)
}
syn::GenericParam::Const(syn::ConstParam { ident, .. }) => quote!(#ident),
Expand Down Expand Up @@ -264,7 +264,7 @@ fn xylem_impl(ts: TokenStream) -> Result<Output> {
)
}
syn::Data::Union(data) => {
return Err(Error::new_spanned(&data.union_token, "Unions are not supported"));
return Err(Error::new_spanned(data.union_token, "Unions are not supported"));
}
};

Expand Down Expand Up @@ -460,7 +460,7 @@ fn process_field(
let mut from_attrs = TokenStream::new();

for attr in &field.attrs {
if attr.path.is_ident("xylem") {
if attr.path().is_ident("xylem") {
let attrs: Punctuated<FieldAttr, syn::Token![,]> =
attr.parse_args_with(Punctuated::parse_terminated)?;
for attr in attrs {
Expand Down

0 comments on commit 497f500

Please sign in to comment.