alexcrichton / futures-await

Apache License 2.0
734 stars 55 forks source link

StableFuture is "not in the root" after compiling for 0.2.0-alpha #76

Open durango opened 6 years ago

durango commented 6 years ago
   Compiling futures v0.2.0-beta
   Compiling futures-await-async-macro v0.2.0-alpha
   Compiling futures-await v0.2.0-alpha
error[E0432]: unresolved import `stable::StableFuture`
 --> /Users/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-await-0.2.0-alpha/src/__rt/pinned_future.rs:8:5
  |
8 | use stable::StableFuture;
  |     ^^^^^^^^^^^^^^^^^^^^ no `StableFuture` in the root

error[E0432]: unresolved import `stable::StableStream`
 --> /Users/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-await-0.2.0-alpha/src/__rt/pinned_stream.rs:7:5
  |
7 | use stable::StableStream;
  |     ^^^^^^^^^^^^^^^^^^^^ no `StableStream` in the root

error[E0432]: unresolved import `stable::StableFuture`
  --> /Users/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-await-0.2.0-alpha/src/__rt/mod.rs:16:18
   |
16 | pub use stable::{StableFuture, StableStream};
   |                  ^^^^^^^^^^^^ no `StableFuture` in the root

error[E0432]: unresolved import `stable::StableStream`
  --> /Users/daniel/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-await-0.2.0-alpha/src/__rt/mod.rs:16:32
   |
16 | pub use stable::{StableFuture, StableStream};
   |                                ^^^^^^^^^^^^ no `StableStream` in the root

This was done on a clean/new folder, tried cargo clean, and upgrading my nightly version to most recent rustc 1.26.0-nightly (75af15ee6 2018-03-20) this also occurred on an earlier version of nightly, unfortunately I do not have the actual date/commit for this report.

manuels commented 6 years ago

I can reproduce it. I guess it's because futures is v0.2.0-beta but futures-await is v0.2.0-alpha.

rushmorem commented 6 years ago

The issue is that those types are behind a nightly feature, which futures-await doesn't currently activate.

rushmorem commented 6 years ago

This is fixed in https://github.com/alexcrichton/futures-await/pull/73.

rushmorem commented 6 years ago

The fix has now been merged.