Skip to content

Instantly share code, notes, and snippets.

@Seeker14491
Created September 18, 2016 23:04
Show Gist options
  • Save Seeker14491/19d7e2d86b5fa4d654e0cc78deeb1921 to your computer and use it in GitHub Desktop.
Save Seeker14491/19d7e2d86b5fa4d654e0cc78deeb1921 to your computer and use it in GitHub Desktop.
[futures_tut]$ cargo clean
[futures_tut]$ cargo build
Updating registry `https://github.com/rust-lang/crates.io-index`
Compiling scoped-tls v0.1.0
Compiling openssl v0.8.3
Compiling cfg-if v0.1.0
Compiling lazycell v0.4.0
Compiling bitflags v0.7.0
Compiling libc v0.2.16
Compiling log v0.3.6
Compiling slab v0.3.0
Compiling bitflags v0.4.0
Compiling pkg-config v0.3.8
Compiling semver v0.1.20
Compiling lazy_static v0.2.1
Compiling void v1.0.2
Compiling net2 v0.2.26
Compiling openssl-sys v0.7.17
Compiling rustc_version v0.1.7
Compiling futures v0.1.1
Compiling nix v0.6.0
Compiling openssl-verify v0.2.0
Compiling mio v0.6.0
Compiling tokio-core v0.1.0
Compiling tokio-core v0.1.0 (https://github.com/tokio-rs/tokio-core#418a9735)
Compiling tokio-tls v0.1.0 (https://github.com/tokio-rs/tokio-tls#3d49e52e)
Compiling futures_tut v0.1.0 (file:///home/seekr/projects/rust/single/futures_tut)
error[E0277]: the trait bound `tokio_core::net::TcpStream: tokio_core::io::Io` is not satisfied
--> src/main.rs:20:12
|
20 | cx.handshake("www.rust-lang.org", socket)
| ^^^^^^^^^ trait `tokio_core::net::TcpStream: tokio_core::io::Io` not satisfied
error[E0277]: the trait bound `tokio_core::net::TcpStream: tokio_core::io::Io` is not satisfied
--> src/main.rs:18:32
|
18 | let tls_handshake = socket.and_then(|socket| {
| ^^^^^^^^ trait `tokio_core::net::TcpStream: tokio_core::io::Io` not satisfied
|
= note: required because of the requirements on the impl of `futures::Future` for `tokio_tls::ClientHandshake<tokio_core::net::TcpStream>`
error: no method named `and_then` found for type `futures::AndThen<tokio_core::net::TcpStreamNew, tokio_tls::ClientHandshake<tokio_core::net::TcpStream>, [closure@src/main.rs:18:41: 21:6]>` in the current scope
--> src/main.rs:22:33
|
22 | let request = tls_handshake.and_then(|socket| {
| ^^^^^^^^
|
= note: the method `and_then` exists but the following trait bounds were not satisfied: `tokio_tls::ClientHandshake<tokio_core::net::TcpStream> : futures::IntoFuture`, `futures::AndThen<tokio_core::net::TcpStreamNew, tokio_tls::ClientHandshake<tokio_core::net::TcpStream>, [closure@src/main.rs:18:41: 21:6]> : futures::Future`
error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied
--> src/main.rs:30:13
|
30 | let (_, data) = core.run(response).unwrap();
| ^^^^ trait `[u8]: std::marker::Sized` not satisfied
|
= note: `[u8]` does not have a constant size known at compile-time
= note: all local variables must have a statically known size
error[E0277]: the trait bound `[u8]: std::marker::Sized` is not satisfied
--> src/main.rs:30:26
|
30 | let (_, data) = core.run(response).unwrap();
| ^^^ trait `[u8]: std::marker::Sized` not satisfied
|
= note: `[u8]` does not have a constant size known at compile-time
= note: required because it appears within the type `(_, [u8])`
= note: required by `std::result::Result`
error: aborting due to 5 previous errors
error: Could not compile `futures_tut`.
To learn more, run the command again with --verbose.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment