Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

non-exhaustive patterns #6110

Closed
aurexav opened this issue May 22, 2020 · 3 comments
Closed

non-exhaustive patterns #6110

aurexav opened this issue May 22, 2020 · 3 comments

Comments

@aurexav
Copy link
Contributor

aurexav commented May 22, 2020

With rust nightly-2020-05-21:

error[E0004]: non-exhaustive patterns: `Done(_)` not covered
   --> /home/travis/.cargo/git/checkouts/substrate-a7fa553ead635512/7e9a2ae/client/offchain/src/api/http.rs:183:10
    |
183 |             match when_ready {
    |                   ^^^^^^^^^^ pattern `Done(_)` not covered
    | 
   ::: /home/travis/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.5/src/future/maybe_done.rs:18:5
    |
18  |     Done(Fut::Output),
    |     ---- not covered
    |
    = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
    = note: the matched value is of type `futures_util::future::maybe_done::MaybeDone<futures_util::future::poll_fn::PollFn<[closure@/home/travis/.cargo/git/checkouts/substrate-a7fa553ead635512/7e9a2ae/client/offchain/src/api/http.rs:181:60: 181:86 sender:&mut &mut hyper::body::body::Sender]>>`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0004`.
error: could not compile `sc-offchain`.
To learn more, run the command again with --verbose.
warning: build failed, waiting for other jobs to finish...
error: build failed
The command ".maintain/ci/build_script.sh" exited with 101.
@gui1117
Copy link
Contributor

gui1117 commented May 22, 2020

could we expect rustc to recover from this regression ? Done is covered by:

				future::MaybeDone::Done(Ok(())) => {}
				future::MaybeDone::Done(Err(_)) => return Err(HttpError::IoError),

@burdges
Copy link

burdges commented May 22, 2020

It could be related to, or even a simpler case of, rust-lang/rust#71977 You could ask if rustc wants a pull request for a test that covers these.

@bkchr
Copy link
Member

bkchr commented May 23, 2020

Rustc bug: rust-lang/rust#72476

@bkchr bkchr closed this as completed May 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants