Compare commits

..

2 Commits

Author SHA1 Message Date
Mahmoud Al-Qudsi 005530355c Corrected error output 2017-12-10 15:53:33 -06:00
Mahmoud Al-Qudsi 9ec63c8b6a Detailing rust-lang/rust#46644 2017-12-10 15:52:10 -06:00
3 changed files with 12 additions and 14 deletions

@ -9,7 +9,7 @@ bench:
@$(CARGO) bench @$(CARGO) bench
build: build:
@env TERM=xterm-256color $(CARGO) build --color=always 2>&1; $(CARGO) build 2> cargo.out 1>/dev/null @env TERM=xterm-256color $(CARGO) build --color=always 2>&1
check: build test check: build test

@ -1,14 +1,13 @@
Compiling futuretest v0.1.0 (file:///mnt/c/Users/Mahmoud/git/futuretest) Compiling futuretest v0.1.0 (file:///mnt/d/GIT/futuretest)
error[E0277]: the trait bound `(): futures::Future` is not satisfied error[E0271]: type mismatch resolving `<futures::FutureResult<std::result::Result<(), _>, ()> as futures::Future>::Item == ()`
--> src/main.rs:17:1 --> src/main.rs:17:23
| |
17 | / fn test() -> MapErr<(), ()> { 17 | fn create_future() -> impl Future<Item=(), Error=()> {
18 | | future::ok(()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found ()
19 | | .map_err(|String| ())
20 | | }
| |_^ the trait `futures::Future` is not implemented for `()`
| |
= note: required by `futures::MapErr` = note: expected type `std::result::Result<(), _>`
found type `()`
= note: the return type of a function must have a statically known size
error: aborting due to previous error error: aborting due to previous error

@ -9,12 +9,11 @@ use tokio_core::reactor::Core;
fn main() { fn main() {
let mut core = Core::new().expect("Failed to initialize tokio_core reactor!"); let mut core = Core::new().expect("Failed to initialize tokio_core reactor!");
let f = test(); let f = create_future();
core.run(f).unwrap(); core.run(f).unwrap();
} }
fn test() -> MapErr<(), ()> { fn create_future() -> impl Future<Item=(), Error=()> {
future::ok(()) return future::ok(Ok(()));
.map_err(|String| ())
} }