Skip to content

Switch to new std::io #347

@John-Nagle

Description

@John-Nagle

Installed Rust nightly build, after not using Rust for 3 weeks. Hyper won't compile any more.
The I/O libraries changed. Again. Not your fault. Sigh.

Compiling hyper v0.2.1
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:215:25: 215:29 error: mismatched types:
 expected `&std::path::Path`,
    found `&std::old_path::posix::Path`
(expected struct `std::path::Path`,
    found struct `std::old_path::posix::Path`) [E0308]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:215                         cert, X509FileType::PEM).map(lift_ssl_error));
                                                                                                              ^~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:19:1: 24:2 note: in expansion of try_some!
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:214:17: 215:71 note: expansion site
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:217:25: 217:28 error: mismatched types:
 expected `&std::path::Path`,
    found `&std::old_path::posix::Path`
(expected struct `std::path::Path`,
    found struct `std::old_path::posix::Path`) [E0308]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:217                         key, X509FileType::PEM).map(lift_ssl_error));
                                                                                                              ^~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:19:1: 24:2 note: in expansion of try_some!
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:216:17: 217:70 note: expansion site
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:243:23: 243:57 error: the trait `std::io::Read` is not implemented for the type `std::old_io::net::tcp::TcpStream` [E0277]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:243                 match SslStream::<TcpStream>::new_server(&**ssl_context, stream) {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:243:23: 243:57 error: the trait `std::io::Write` is not implemented for the type `std::old_io::net::tcp::TcpStream` [E0277]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:243                 match SslStream::<TcpStream>::new_server(&**ssl_context, stream) {
                                                                                                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:249:42: 249:48 error: attempted access of field `desc` on type `&std::io::error::Error`, but no field with that name was found
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:249                             detail: Some(e.desc.to_string())
                                                                                                                               ^~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:289:55: 289:64 error: type `&mut openssl::ssl::SslStream<std::old_io::net::tcp::TcpStream>` does not implement any method in scope named `read`
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:289             HttpStream::Https(ref mut inner) => inner.read(buf)
                                                                                                                                            ^~~~~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:299:55: 299:69 error: type `&mut openssl::ssl::SslStream<std::old_io::net::tcp::TcpStream>` does not implement any method in scope named `write_all`
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:299             HttpStream::Https(ref mut inner) => inner.write_all(msg)
                                                                                                                                            ^~~~~~~~~~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:306:55: 306:62 error: type `&mut openssl::ssl::SslStream<std::old_io::net::tcp::TcpStream>` does not implement any method in scope named `flush`
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:306             HttpStream::Https(ref mut inner) => inner.flush(),
                                                                                                                                            ^~~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:315:55: 315:64 error: type `&mut openssl::ssl::SslStream<std::old_io::net::tcp::TcpStream>` does not implement any method in scope named `get_mut`
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:315             HttpStream::Https(ref mut inner) => inner.get_mut().peer_name()
                                                                                                                                            ^~~~~~~~~
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:346:35: 346:49 error: the trait `std::io::Read` is not implemented for the type `std::old_io::net::tcp::TcpStream` [E0277]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:346                 let stream = try!(SslStream::new(&context, stream).map_err(lift_ssl_error));
                                                                                                                        ^~~~~~~~~~~~~~
<std macros>:1:1: 6:57 note: in expansion of try!
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:346:30: 346:93 note: expansion site
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:346:35: 346:49 error: the trait `std::io::Write` is not implemented for the type `std::old_io::net::tcp::TcpStream` [E0277]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:346                 let stream = try!(SslStream::new(&context, stream).map_err(lift_ssl_error));
                                                                                                                        ^~~~~~~~~~~~~~
<std macros>:1:1: 6:57 note: in expansion of try!
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:346:30: 346:93 note: expansion site
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:363:29: 363:32 error: mismatched types:
 expected `std::old_io::IoError`,
    found `std::io::error::Error`
(expected struct `std::old_io::IoError`,
    found struct `std::io::error::Error`) [E0308]
/home/john/.cargo/registry/src/github.com-1ecc6299db9ec823/hyper-0.2.1/src/net.rs:363         StreamError(err) => err,
                                                                                                                  ^~~
error: aborting due to 12 previous errors
Could not compile `hyper`.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions