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

Can't compile crate with gloo-events #120

Closed
kellpossible opened this issue Jul 28, 2020 · 2 comments
Closed

Can't compile crate with gloo-events #120

kellpossible opened this issue Jul 28, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@kellpossible
Copy link

Describe the Bug

With a recent version of the following dependencies, gloo-events stopped compiling:

[dependencies]
gloo-events = "0.1"
wasm-bindgen = "0.2"
web-sys = "0.3"
Checking gloo-events v0.1.1
error[E0308]: mismatched types
   --> /home/luke/.cargo/registry/src/github.com-1ecc6299db9ec823/gloo-events-0.1.1/src/lib.rs:537:9
    |
534 |     pub fn forget(mut self) {
    |                             - expected `()` because of default return type
...
537 |         self.callback.take().unwrap_throw().forget()
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^- help: try adding a semicolon: `;`
    |         |
    |         expected `()`, found struct `wasm_bindgen::JsValue`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0308`.
error: could not compile `gloo-events`.

Steps to Reproduce

Create a new crate with the following dependencies:

[dependencies]
gloo-events = "0.1"
wasm-bindgen = "0.2"
web-sys = "0.3"

run cargo check

@kellpossible kellpossible added the bug Something isn't working label Jul 28, 2020
@kellpossible
Copy link
Author

kellpossible commented Jul 28, 2020

It seems likely this break is due to the following change in wasm-bindgen rustwasm/wasm-bindgen#2248 and released in wasm-bindgen version 0.2.66

@kellpossible
Copy link
Author

Fixed in wasm-bindgen 0.2.77.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant