Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update syn requirement from 1.0.81 to 2.0.4 #3

Merged
merged 2 commits into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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