]> git.proxmox.com Git - rustc.git/blame - src/test/ui/never_type/exhaustive_patterns.stderr
Update unsuspicious file list
[rustc.git] / src / test / ui / never_type / exhaustive_patterns.stderr
CommitLineData
487cf647
FG
1error[E0005]: refutable pattern in local binding: `Either::B(_)` not covered
2 --> $DIR/exhaustive_patterns.rs:20:9
3 |
4LL | let Either::A(()) = foo();
5 | ^^^^^^^^^^^^^ pattern `Either::B(_)` not covered
6 |
7 = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
8 = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
9note: `Either<(), !>` defined here
10 --> $DIR/exhaustive_patterns.rs:12:5
11 |
12LL | enum Either<A, B> {
13 | ------
14LL | A(A),
15LL | B(inner::Wrapper<B>),
16 | ^ not covered
17 = note: the matched value is of type `Either<(), !>`
18help: you might want to use `if let` to ignore the variant that isn't matched
19 |
20LL | if let Either::A(()) = foo() { todo!() }
21 | ++ ~~~~~~~~~~~
22
23error: aborting due to previous error
24
25For more information about this error, try `rustc --explain E0005`.