Skip to content

Running MQTT package with v2020 generates error #1

Open
@maxbull

Description

@maxbull

I know it's 2018 based, but in a previous version I was able to use nightly builds to compile correctly, now produces error.

My app uses v1.75, and nightly builds and now I get something like this

error[E0277]: the trait bound `std::future::GenFuture<[static generator@src/main.rs:236:18: 239:6 _]>: std::marker::Unpin` is not satisfied in `impl std::future::Future`
  --> src/main.rs:236:7
   |
36 |     s.push(async {
   |       ^^^^ within `impl std::future::Future`, the trait `std::marker::Unpin` is not implemented for `std::future::GenFuture<[static generator@src/main.rs:36:18: 39:6 _]>`
   |
   = help: the following implementations were found:
             <std::future::GenFuture<T> as std::marker::Unpin>
   = note: required because it appears within the type `impl std::future::Future`

error[E0599]: no method named `push` found for type `Scope<impl std::future::Future>` in the current scope
  --> src/main.rs:40:7
   |
4  | / struct Scope<T>
5  | | where
6  | |     T: std::future::Future + std::marker::Unpin,
7  | | {
8  | |     v: Vec<T>,
9  | | }
   | |_- method `push` not found for this

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Ready

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions