Files
rust/tests/ui/pattern/usefulness/impl-trait.stderr

141 lines
4.4 KiB
Plaintext
Raw Normal View History

2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:16:13
2023-10-29 21:14:52 +01:00
|
LL | _ => {}
| ^ matches no values because `Void` is uninhabited
2023-10-29 21:14:52 +01:00
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
2023-10-29 21:14:52 +01:00
note: the lint level is defined here
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:4:9
2023-10-29 21:14:52 +01:00
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:30:13
|
LL | _ => {}
| ^ matches no values because `Void` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:44:13
|
LL | Some(_) => {}
| ^^^^^^^ matches no values because `Void` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:48:13
2023-11-16 08:53:21 +01:00
|
LL | None => {}
| ---- matches all the relevant values
2023-11-16 08:53:21 +01:00
LL | _ => {}
| ^ no value can reach this
2023-11-16 08:53:21 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:58:13
|
LL | Some(_) => {}
| ^^^^^^^ matches no values because `Void` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:62:13
2023-10-29 21:14:52 +01:00
|
LL | None => {}
| ---- matches all the relevant values
2023-10-29 21:14:52 +01:00
LL | _ => {}
| ^ no value can reach this
2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:75:9
|
LL | _ => {}
| ^ matches no values because `Void` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:85:9
2023-10-29 21:14:52 +01:00
|
LL | _ => {}
| - matches any value
LL | Some((a, b)) => {}
| ^^^^^^^^^^^^ no value can reach this
2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:93:13
|
LL | _ => {}
| ^ matches no values because `Void` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:104:9
2023-10-29 21:14:52 +01:00
|
LL | Some((a, b)) => {}
| ------------ matches all the relevant values
2023-10-29 21:14:52 +01:00
LL | Some((mut x, mut y)) => {
| ^^^^^^^^^^^^^^^^^^^^ no value can reach this
2023-10-29 21:14:52 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:123:13
2023-10-29 21:14:52 +01:00
|
LL | _ => {}
| - matches any value
LL | Rec { n: 0, w: Some(Rec { n: 0, w: _ }) } => {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no value can reach this
2023-10-29 21:14:52 +01:00
2023-11-16 08:53:21 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:137:13
2023-11-16 08:53:21 +01:00
|
LL | _ => {}
| ^ matches no values because `SecretelyVoid` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
2023-11-16 08:53:21 +01:00
error: unreachable pattern
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:150:13
2023-11-16 08:53:21 +01:00
|
LL | _ => {}
| ^ matches no values because `SecretelyDoubleVoid` is uninhabited
|
= note: to learn more about uninhabited types, see https://doc.rust-lang.org/nomicon/exotic-sizes.html#empty-types
2023-11-16 08:53:21 +01:00
2023-10-29 21:14:52 +01:00
error[E0004]: non-exhaustive patterns: type `impl Copy` is non-empty
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:22:11
2023-10-29 21:14:52 +01:00
|
LL | match return_never_rpit(x) {}
| ^^^^^^^^^^^^^^^^^^^^
|
= note: the matched value is of type `impl Copy`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
LL ~ match return_never_rpit(x) {
LL + _ => todo!(),
LL + }
|
error[E0004]: non-exhaustive patterns: type `T` is non-empty
2024-07-27 11:08:16 +02:00
--> $DIR/impl-trait.rs:36:11
2023-10-29 21:14:52 +01:00
|
LL | match return_never_tait(x) {}
| ^^^^^^^^^^^^^^^^^^^^
|
= note: the matched value is of type `T`
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern as shown
|
LL ~ match return_never_tait(x) {
LL + _ => todo!(),
LL + }
|
2023-11-16 08:53:21 +01:00
error: aborting due to 15 previous errors
2023-10-29 21:14:52 +01:00
For more information about this error, try `rustc --explain E0004`.