rustc version: rustc 1.30.0-nightly (a8c11d216 2018-09-06)
I'm trying to use wasm-bindgen in an existing project that's a member of a workspace but I run into this error:
cargo build --target wasm32-unknown-unknown --release
Compiling sass-sys v0.4.7
Compiling wasm-bindgen-macro-support v0.2.21
error[E0277]: the trait bound `&mut syn::Field: quote::ToTokens` is not satisfied
--> /home/steve/.cargo/registry/src/github.com-1ecc6299db9ec823/wasm-bindgen-macro-support-0.2.21/src/parser.rs:361:44
|
361 | assert_not_variadic(&opts, &field)?;
| -^^^^^
| |
| the trait `quote::ToTokens` is not implemented for `&mut syn::Field`
| help: consider removing 1 leading `&`-references
|
= help: the following implementations were found:
<syn::Field as quote::ToTokens>
= note: required for the cast to the object type `dyn quote::ToTokens`
Compiling sass-rs v0.2.1
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: Could not compile `wasm-bindgen-macro-support`.
warning: build failed, waiting for other jobs to finish...
error: build failed
The top-level Cargo.toml looks like:
[workspace]
members = [
"backend",
"frontend",
]
The Crate where I use wasm-bindgen looks like:
[lib]
crate-type = ["cdylib"]
[dependencies]
lazy_static = "1.0.2"
failure = "0.1.1"
serde = "1.0.70"
serde_derive = "1.0.70"
capnp = "0.8.17"
wakkave = { path = ".." }
wasm-bindgen = "0.2"
I don't get any errors when using wasm-bindgen in a fresh project.
Did you try running cargo update?
Wow, thanks for replying so quick. That fixed it!
Most helpful comment
Did you try running
cargo update?