Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to compile hello-world example (AsyncRead is not implemented for std::io::Empty) #73

Closed
flopacero opened this issue Sep 28, 2019 · 1 comment · Fixed by #74
Closed
Assignees

Comments

@flopacero
Copy link

I tried to compile examples/hello-world.rs example on rust 1.39 beta and got an exception while compiling surf

error[E0277]: the trait bound `std::io::Empty: futures_io::if_std::AsyncRead` is not satisfied
  --> /home/akviatko/.cargo/registry/src/github.com-1ecc6299db9ec823/surf-1.0.2/src/http_client/mod.rs:64:21
   |
64 |             reader: Box::new(std::io::empty()),
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `futures_io::if_std::AsyncRead` is not implemented for `std::io::Empty`
   |
   = note: required for the cast to the object type `dyn futures_io::if_std::AsyncRead + std::marker::Send + std::marker::Unpin`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `surf`.

To learn more, run the command again with --verbose.
  • rust toolchain: beta-x86_64-unknown-linux-gnu
  • rustc 1.39.0-beta.2 (5752b6348 2019-09-27)

I also created a repo with example project that does not compile. It has Cargo.lock which might help to investigate the bug.

@taiki-e
Copy link
Contributor

taiki-e commented Sep 28, 2019

This is because of rust-lang/futures-rs#1829

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

Successfully merging a pull request may close this issue.

2 participants