Skip to content

wasi-http doesn't compile with current rust nightly with -Znext-solver enabled by default #14192

Description

@12101111

Test Case

N/A

Steps to Reproduce

  • cargo +nightly b -p wasmtime-cli

Expected Results

It should compile.

Actual Results

error[E0283]: type annotations needed
    ╭▸ crates/wasi-http/src/p3/bindings.rs:5:5
    │
  5 │ ┏     wasmtime::component::bindgen!({
  6 │ ┃         path: "src/p3/wit",
  7 │ ┃         world: "wasi:http/service",
  8 │ ┃         imports: {
    ‡ ┃
 29 │ ┃         },
 30 │ ┃     });
    │ ┗━━━━━━┛ cannot infer type
    ╰╴
note: multiple `impl`s or `where` clauses satisfying `_: HostRequestWithStore<T>` found
    ╭▸ crates/wasi-http/src/p3/bindings.rs:5:5
    │
  5 │ ┏     wasmtime::component::bindgen!({
  6 │ ┃         path: "src/p3/wit",
  7 │ ┃         world: "wasi:http/service",
  8 │ ┃         imports: {
    ‡ ┃
 29 │ ┃         },
 30 │ ┃     });
    │ ┗━━━━━━┛
    │
    ⸬  crates/wasi-http/src/p3/host/types.rs:215:1
    │
215 │   impl<T> HostRequestWithStore<T> for WasiHttp {
    │   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    ├ note: cannot satisfy `for<'a> <D as HasData>::Data<'a> == _`
    ╰ note: this error originates in the macro `wasmtime::component::bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0283]: type annotations needed
    ╭▸ crates/wasi-http/src/p3/bindings.rs:5:5
    │
  5 │ ┏     wasmtime::component::bindgen!({
  6 │ ┃         path: "src/p3/wit",
  7 │ ┃         world: "wasi:http/service",
  8 │ ┃         imports: {
    ‡ ┃
 29 │ ┃         },
 30 │ ┃     });
    │ ┗━━━━━━┛ cannot infer type
    ╰╴
note: multiple `impl`s or `where` clauses satisfying `_: HostResponseWithStore<T>` found
    ╭▸ crates/wasi-http/src/p3/bindings.rs:5:5
    │
  5 │ ┏     wasmtime::component::bindgen!({
  6 │ ┃         path: "src/p3/wit",
  7 │ ┃         world: "wasi:http/service",
  8 │ ┃         imports: {
    ‡ ┃
 29 │ ┃         },
 30 │ ┃     });
    │ ┗━━━━━━┛
    │
    ⸬  crates/wasi-http/src/p3/host/types.rs:473:1
    │
473 │   impl<T> HostResponseWithStore<T> for WasiHttp {
    │   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
    ╰ note: this error originates in the macro `wasmtime::component::bindgen` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0283`.
error: could not compile `wasmtime-wasi-http` (lib) due to 2 previous errors

Versions and Environment

Wasmtime version or commit: e6b33de

Operating system: Linux/macOS

Architecture: x86_64/arm64

Extra Info

Link to rust tracking issue: rust-lang/rust#160895

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions