multiformats / rust-multihash

multihash implementation in Rust
https://github.com/multiformats/multihash
Other
150 stars 60 forks source link

updating dependencies on syn and synstructure. #362

Closed plugwash closed 3 months ago

plugwash commented 4 months ago

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 commented 4 months ago

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