rust/src/test/ui/non-exhaustive/non-exhaustive-match.stderr

80 lines
3.2 KiB
Plaintext
Raw Normal View History

error[E0004]: non-exhaustive patterns: `A` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:8:11
2018-08-08 07:28:26 -05:00
|
LL | enum T { A, B }
| ---------------
| | |
| | not covered
| `T` defined here
...
LL | match x { T::B => { } } //~ ERROR non-exhaustive patterns: `A` not covered
| ^ pattern `A` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `false` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:9:11
2018-08-08 07:28:26 -05:00
|
LL | match true { //~ ERROR non-exhaustive patterns: `false` not covered
| ^^^^ pattern `false` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `Some(_)` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:12:11
2018-08-08 07:28:26 -05:00
|
LL | match Some(10) { //~ ERROR non-exhaustive patterns: `Some(_)` not covered
| ^^^^^^^^ pattern `Some(_)` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:15:11
2018-08-08 07:28:26 -05:00
|
LL | match (2, 3, 4) { //~ ERROR non-exhaustive patterns: `(_, _, -2147483648i32..=3i32)`
| ^^^^^^^^^ patterns `(_, _, -2147483648i32..=3i32)` and `(_, _, 5i32..=2147483647i32)` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `(A, A)` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:19:11
2018-08-08 07:28:26 -05:00
|
LL | match (T::A, T::A) { //~ ERROR non-exhaustive patterns: `(A, A)` not covered
| ^^^^^^^^^^^^ pattern `(A, A)` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `B` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:23:11
2018-08-08 07:28:26 -05:00
|
LL | enum T { A, B }
| ---------------
| | |
| | not covered
| `T` defined here
...
LL | match T::A { //~ ERROR non-exhaustive patterns: `B` not covered
| ^^^^ pattern `B` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `[]` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:34:11
2018-08-08 07:28:26 -05:00
|
LL | match *vec { //~ ERROR non-exhaustive patterns: `[]` not covered
| ^^^^ pattern `[]` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error[E0004]: non-exhaustive patterns: `[_, _, _, _]` not covered
2018-12-25 09:56:47 -06:00
--> $DIR/non-exhaustive-match.rs:47:11
2018-08-08 07:28:26 -05:00
|
LL | match *vec { //~ ERROR non-exhaustive patterns: `[_, _, _, _]` not covered
| ^^^^ pattern `[_, _, _, _]` not covered
|
= help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms
2018-08-08 07:28:26 -05:00
error: aborting due to 8 previous errors
For more information about this error, try `rustc --explain E0004`.