esp-rs / embedded-svc

Rust APIs and abstractions for various embedded services (WiFi, Network, Httpd, Logging, etc.)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Compile error when using "experimental" feature

fkohlgrueber opened this issue · comments

On current nightly, compiling the crate with the "experimental" feature fails:

cargo build --features experimental
error: Missing required bounds on Request
 --> src/http/client.rs:8:5
  |
8 |     type Request<'a>: HttpRequest<'a, Error = Self::Error>;
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
  |                                                           |
  |                                                           help: add the required where clauses: `where Self: 'a`

error: Missing required bounds on Slot
  --> src/ota.rs:70:5
   |
70 |     type Slot<'a>: OtaSlot;
   |     ^^^^^^^^^^^^^^^^^^^^^^-
   |                           |
   |                           help: add the required where clauses: `where Self: 'a`

error: Missing required bounds on Update
  --> src/ota.rs:71:5
   |
71 |     type Update<'a>: OtaUpdate;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^-
   |                               |
   |                               help: add the required where clauses: `where Self: 'a`

error: Missing required bounds on OtaRead
   --> src/ota.rs:133:5
    |
133 |     type OtaRead<'a>: OtaRead<Error = Self::Error>;
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-
    |                                                   |
    |                                                   help: add the required where clauses: `where Self: 'a`

Not sure when this was introduced, but it seems like CI doesn't have coverage for the "experimental" feature.

Seems like it's related to recent changes in nightly. See for example here: rust-lang/rust#90808

Fixed with 0.13.
NOTE: The experimental features are WIP and not even tested (that is, aside from the HTTP client).