Skip to content

regression: mismatched types #128891

Closed as not planned
Closed as not planned
@BoxyUwU

Description

@BoxyUwU
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/kobold-39364116f2711f0d/53eacf6/crates/kobold/src/stateful/hook.rs:167:13
[INFO] [stdout]     |
[INFO] [stdout] 167 |             cb as UnsafeCallback<S>
[INFO] [stdout]     |             ^^^^^^^^^^^^^^^^^^^^^^^ expected `event::Event<T, E>`, found `web_sys::Event`
[INFO] [stdout]     |
[INFO] [stdout]     = note: `web_sys::Event` and `event::Event<T, E>` have similar names, but are actually distinct types
[INFO] [stdout] note: `web_sys::Event` is defined in crate `web_sys`
[INFO] [stdout]    --> /opt/rustwide/cargo-home/registry/src/index.crates.io-6f17d22bba15001f/web-sys-0.3.61/src/features/gen_Event.rs:4:1
[INFO] [stdout]     |
[INFO] [stdout] 4   | #[wasm_bindgen]
[INFO] [stdout]     | ^^^^^^^^^^^^^^^
[INFO] [stdout] note: `event::Event<T, E>` is defined in the current crate
[INFO] [stdout]    --> /opt/rustwide/cargo-home/git/checkouts/kobold-39364116f2711f0d/53eacf6/crates/kobold/src/event.rs:12:1
[INFO] [stdout]     |
[INFO] [stdout] 12  | pub struct Event<T = HtmlElement, E = web_sys::Event> {
[INFO] [stdout]     | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stdout]     = help: `dyn CallbackFn<S, web_sys::Event>` implements `CallbackFn` so you could box the found value and coerce it to the trait object `Box<dyn CallbackFn>`, you will have to change the expected type as well
[INFO] [stdout]     = note: this error originates in the attribute macro `wasm_bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-stablePerformance or correctness regression from one stable version to another.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions