]> git.lizzy.rs Git - rust.git/blob - src/test/ui/empty/empty-never-array.stderr
6608ad763b2e94c5f7bfcd90f3ebac419768c0ea
[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 LL | |     #[allow(dead_code)]
7 LL | |     U(U),
8 LL | | }
9    | |_- `Helper<T, U>` defined here
10 ...
11 LL |       let Helper::U(u) = Helper::T(t, []);
12    |           ^^^^^^^^^^^^ pattern `T(_, _)` not covered
13
14 warning[E0381]: use of possibly uninitialized variable: `u`
15   --> $DIR/empty-never-array.rs:12:5
16    |
17 LL |     u
18    |     ^ use of possibly uninitialized `u`
19    |
20    = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
21    = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
22
23 error: aborting due to previous error
24
25 Some errors have detailed explanations: E0005, E0381.
26 For more information about an error, try `rustc --explain E0005`.