rust/src/test/ui/pattern/usefulness/non-exhaustive-pattern-witness.stderr

96 lines
3.5 KiB
Plaintext
Raw Normal View History

error[E0004]: non-exhaustive patterns: `Foo { first: false, second: Some([_, _, _, _]) }` not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:7:11
|
LL | / struct Foo {
LL | | first: bool,
LL | | second: Option<[usize; 4]>
LL | | }
| |_- `Foo` defined here
...
LL | match (Foo { first: true, second: None }) {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pattern `Foo { first: false, second: Some([_, _, _, _]) }` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `Red` not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:23:11
|
LL | / enum Color {
LL | | Red,
| | --- not covered
LL | | Green,
LL | | CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
LL | | }
| |_- `Color` defined here
...
LL | match Color::Red {
| ^^^^^^^^^^ pattern `Red` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `East`, `South` and `West` not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:35:11
|
LL | / enum Direction {
LL | | North, East, South, West
| | ---- ----- ---- not covered
| | | |
| | | not covered
| | not covered
LL | | }
| |_- `Direction` defined here
...
LL | match Direction::North {
| ^^^^^^^^^^^^^^^^ patterns `East`, `South` and `West` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `Second`, `Third`, `Fourth` and 8 more not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:46:11
|
LL | / enum ExcessiveEnum {
LL | | First, Second, Third, Fourth, Fifth, Sixth, Seventh, Eighth, Ninth, Tenth, Eleventh, Twelfth
LL | | }
| |_- `ExcessiveEnum` defined here
...
LL | match ExcessiveEnum::First {
| ^^^^^^^^^^^^^^^^^^^^ patterns `Second`, `Third`, `Fourth` and 8 more not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `CustomRGBA { a: true, .. }` not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:54:11
|
LL | / enum Color {
LL | | Red,
LL | | Green,
LL | | CustomRGBA { a: bool, r: u8, g: u8, b: u8 }
| | ---------- not covered
LL | | }
| |_- `Color` defined here
...
LL | match Color::Red {
| ^^^^^^^^^^ pattern `CustomRGBA { a: true, .. }` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `[Second(true), Second(false)]` not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:70:11
|
2018-02-22 18:42:32 -06:00
LL | match *x {
| ^^ pattern `[Second(true), Second(false)]` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error[E0004]: non-exhaustive patterns: `((), false)` not covered
2019-12-29 18:23:42 -06:00
--> $DIR/non-exhaustive-pattern-witness.rs:83:11
|
2018-02-22 18:42:32 -06:00
LL | match ((), false) {
| ^^^^^^^^^^^ pattern `((), false)` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
error: aborting due to 7 previous errors
2018-03-03 08:59:40 -06:00
For more information about this error, try `rustc --explain E0004`.