]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-never-array.stderr
Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup
[rust.git] / src / test / ui / empty / empty-never-array.stderr
1 error[E0005]: refutable pattern in local binding: `T(_, _)` not covered
2   --> $DIR/empty-never-array.rs:10:9
3    |
4 LL | / enum Helper<T, U> {
5 LL | |     T(T, [!; 0]),
6    | |     - not covered
7 LL | |     #[allow(dead_code)]
8 LL | |     U(U),
9 LL | | }
10    | |_- `Helper<T, U>` defined here
11 ...
12 LL |       let Helper::U(u) = Helper::T(t, []);
13    |           ^^^^^^^^^^^^ pattern `T(_, _)` not covered
14    |
15    = note: `let` bindings require an "irrefutable pattern", like a `struct` or an `enum` with only one variant
16    = note: for more information, visit https://doc.rust-lang.org/book/ch18-02-refutability.html
17    = note: the matched value is of type `Helper<T, U>`
18 help: you might want to use `if let` to ignore the variant that isn't matched
19    |
20 LL |     if let Helper::U(u) = Helper::T(t, []) { /* */ }
21    |
22
23 error: aborting due to previous error
24
25 For more information about this error, try `rustc --explain E0005`.