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

unsatisfied trait bound #79

Closed
iEricKoh opened this issue Oct 14, 2019 · 3 comments
Closed

unsatisfied trait bound #79

iEricKoh opened this issue Oct 14, 2019 · 3 comments

Comments

@iEricKoh
Copy link

I am currently using surf v1.0.2 with rustc 1.40.0-nightly (c27f7568b 2019-10-13).

Here's the error when I trying to run the example on the README.

error[E0277]: the trait bound `std::io::Empty: futures_io::if_std::AsyncRead` is not satisfied
  --> /home/eric/.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`.
@xmclark
Copy link

xmclark commented Oct 15, 2019

Came here to report this. I am able to reproduce it with a minimal reproducible example:

toolchain:
beta-x86_64-pc-windows-gnu

[package]
name = "basic-example-rustasync"
version = "0.1.0"
authors = ["Mackenzie Clark <mackenzie.a.z.c@gmail.com>"]
edition = "2018"

[dependencies]
runtime = "0.3.0-alpha.7"
surf = "1.0.2"
#[runtime::main]
async fn main() {
}

@taiki-e
Copy link
Contributor

taiki-e commented Oct 15, 2019

This is a duplicate of #73 - It has already been fixed in master, but a new version has not yet been released. (cc @yoshuawuyts)

@yoshuawuyts
Copy link
Member

This should have been fixed in the latest release. Going to go ahead and close this. Apologies for the delay, and thanks for reporting!

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

No branches or pull requests

4 participants