Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

compilation fails for asynch.rs #7

Closed
vortex314 opened this issue Nov 1, 2022 · 4 comments
Closed

compilation fails for asynch.rs #7

vortex314 opened this issue Nov 1, 2022 · 4 comments

Comments

@vortex314
Copy link

Any idea what could be the cause of these compilation errors ?

error[E0658]: generic associated types are unstable
  --> /home/lieven/.cargo/registry/src/github.lhy31512.workers.dev-1ecc6299db9ec823/embedded-io-0.3.1/src/asynch.rs:17:5
   |
17 | /     type ReadFuture<'a>: Future<Output = Result<usize, Self::Error>>
18 | |     where
19 | |         Self: 'a;
   | |_________________^
   |
   = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
   = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable

error[E0658]: where clauses on associated types are unstable
  --> /home/lieven/.cargo/registry/src/github.lhy31512.workers.dev-1ecc6299db9ec823/embedded-io-0.3.1/src/asynch.rs:17:5
   |
17 | /     type ReadFuture<'a>: Future<Output = Result<usize, Self::Error>>
18 | |     where
19 | |         Self: 'a;
   | |_________________^
   |
   = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
   = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable

error[E0658]: generic associated types are unstable
  --> /home/lieven/.cargo/registry/src/github.lhy31512.workers.dev-1ecc6299db9ec823/embedded-io-0.3.1/src/asynch.rs:48:5
   |
48 | /     type FillBufFuture<'a>: Future<Output = Result<&'a [u8], Self::Error>>
49 | |     where
50 | |         Self: 'a;
   | |_________________^
   |
   = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
   = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable

error[E0658]: where clauses on associated types are unstable
  --> /home/lieven/.cargo/registry/src/github.lhy31512.workers.dev-1ecc6299db9ec823/embedded-io-0.3.1/src/asynch.rs:48:5
   |
48 | /     type FillBufFuture<'a>: Future<Output = Result<&'a [u8], Self::Error>>
49 | |     where
50 | |         Self: 'a;
   | |_________________^
   |
   = note: see issue #44265 <https://github.com/rust-lang/rust/issues/44265> for more information
   = help: add `#![feature(generic_associated_types)]` to the crate attributes to enable
.....

@Dirbaio
Copy link
Member

Dirbaio commented Nov 1, 2022

You're using a too old nightly, make sure to use this one:

channel = "nightly-2022-10-24"

@Dirbaio Dirbaio closed this as completed Nov 1, 2022
@Dirbaio Dirbaio reopened this Nov 1, 2022
@vortex314
Copy link
Author

Thanks for the swift response.
looks like target xtensa-esp32-espidf enforces a bad combination of crates and rust compiler.
I'm still a newbie on rust, these incompatibilities makes it difficult to get started.

@fermuch
Copy link

fermuch commented Nov 1, 2022

@vortex314 hey, new here too 😃 How did you solve it?

@vortex314
Copy link
Author

vortex314 commented Nov 1, 2022

@fermuch i didn't. it looks like the version 0.3.1 contains some changes that are breaking compared to 0.3.0.
espressif rust is using embedded-svc that requires embedded-io 0.3 and takes by default 0.3.1, which probably worked fine with 0.3.0.
this is based on my basic understanding of the dependency tree in esp-std-demo , so i could be mistaken.
the esp32 target probably uses an older version of the compiler than required by this crate.

i don't have enough experience to correct this dependency. so i signalled this also to espressif github.
ivmarkov/rust-esp32-std-demo#123

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants