tokio-rs / tokio-core

I/O primitives and event loop for async I/O in Rust
Apache License 2.0
633 stars 116 forks source link

Compilation error for version 0.1.9 #328

Open surajprak opened 6 years ago

surajprak commented 6 years ago

I am getting below error error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:276:39 | 276 | if let Async::NotReady = self.poll_read() { | ^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:276:16 276 if let Async::NotReady = self.poll_read() { ^^^^^^^^^^^^^^^ expected enum std::result::Result, found enum futures::Async
= note: expected type `std::result::Result<futures::Async<usize>, std::io::Error>`
           found type `futures::Async<_>`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:289:39 | 289 | if let Async::NotReady = self.poll_write() { | ^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:289:16 289 if let Async::NotReady = self.poll_write() { ^^^^^^^^^^^^^^^ expected enum std::result::Result, found enum futures::Async
= note: expected type `std::result::Result<futures::Async<usize>, std::io::Error>`
           found type `futures::Async<_>`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:300:39 | 300 | if let Async::NotReady = self.poll_write() { | ^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:300:16 300 if let Async::NotReady = self.poll_write() { ^^^^^^^^^^^^^^^ expected enum std::result::Result, found enum futures::Async
= note: expected type `std::result::Result<futures::Async<usize>, std::io::Error>`
           found type `futures::Async<_>`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:335:39 | 335 | if let Async::NotReady = self.poll_read() { | ^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:335:16 335 if let Async::NotReady = self.poll_read() { ^^^^^^^^^^^^^^^ expected enum std::result::Result, found enum futures::Async
= note: expected type `std::result::Result<futures::Async<usize>, std::io::Error>`
           found type `futures::Async<_>`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:350:39 | 350 | if let Async::NotReady = self.poll_write() { | ^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:350:16 350 if let Async::NotReady = self.poll_write() { ^^^^^^^^^^^^^^^ expected enum std::result::Result, found enum futures::Async
= note: expected type `std::result::Result<futures::Async<usize>, std::io::Error>`
           found type `futures::Async<_>`

error[E0061]: this function takes 1 parameter but 0 parameters were supplied --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:361:39 | 361 | if let Async::NotReady = self.poll_write() { | ^^^^^^^^^^ expected 1 parameter

error[E0308]: mismatched types --> /home/suraj.prakash/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-core-0.1.9/src/reactor/poll_evented.rs:361:16 361 if let Async::NotReady = self.poll_write() { ^^^^^^^^^^^^^^^ expected enum std::result::Result, found enum futures::Async
= note: expected type `std::result::Result<futures::Async<usize>, std::io::Error>`
           found type `futures::Async<_>`

error: aborting due to 12 previous errors

Some errors occurred: E0061, E0308. For more information about an error, try rustc --explain E0061. error: Could not compile tokio-core. warning: build failed, waiting for other jobs to finish... error: build failed

ferristseng commented 6 years ago

I was just running into this as well with tokio-core-0.1.12.

I ran cargo update and it upgraded tokio-core, and then it worked fine.

$ cargo update
    ...
    Updating tokio-core v0.1.12 -> v0.1.17
    ...