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

updating dependencies on syn and synstructure. #362

Closed
plugwash opened this issue Apr 25, 2024 · 1 comment · Fixed by #363
Closed

updating dependencies on syn and synstructure. #362

plugwash opened this issue Apr 25, 2024 · 1 comment · Fixed by #363

Comments

@plugwash
Copy link

Hi.

I'm one of the Debian rust maintainers, and I'm currently looking at the update of rust-syn to version 2.0 and rust-synstructure to version 0.18.

After bumping the dependency the multihash-derive-impl crate fails to build with

 error[E0609]: no field `tokens` on type `&Attribute`
    --> src/multihash.rs:100:74
     |
 100 |             let attr: Result<utils::Attrs<MhAttr>, _> = syn::parse2(attr.tokens.clone());
 | ^^^^^^ unknown field
    |
    = note: available fields are: `pound_token`, `style`, `bracket_token`, `meta`

 error[E0609]: no field `tokens` on type `&Attribute`
    --> src/multihash.rs:141:82
     |
 141 |         let derive_attrs: Result<utils::Attrs<DeriveAttr>, _> = syn::parse2(attr.tokens.clone());
 | ^^^^^^ unknown field
     |
      = note: available fields are: `pound_token`, `style`, `bracket_token`, `meta`

 error[E0061]: this method takes 2 arguments but 1 argument was supplied
    --> src/utils.rs:25:29
     |
 25  |         let attrs = content.parse_terminated(A::parse)?;
     |                             ^^^^^^^^^^^^^^^^---------- an argument is missing
    | 

Is there any chance of an update/patch to use the current versions of syn/synstructure?

@vmx
Copy link
Member

vmx commented Apr 25, 2024

If someone provides a patch for it, it would certainly be reviewed.

jmg-duarte added a commit to jmg-duarte/rust-multihash that referenced this issue Jun 5, 2024
@vmx vmx closed this as completed in #363 Jun 6, 2024
vmx pushed a commit that referenced this issue Jun 6, 2024
`Ident` was added to `utils::Attrs` since `attr.meta.to_token_stream()` now includes it.
`ParseError` was removed since it didn't seem to be used (and tests seemed to passed)

Fixes #362.
Closes #350. 
Closes #301.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants