rust/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

369 lines
12 KiB
Plaintext
Raw Normal View History

error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:8:9
|
LL | (1 | 2,) => {}
| -------- matches all the relevant values
LL | (1,) => {}
| ^^^^ no value can reach this
|
2020-01-22 23:57:38 +00:00
note: the lint level is defined here
2020-11-21 22:05:17 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:1:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:13:9
|
LL | (1 | 2,) => {}
| -------- matches all the relevant values
LL | (2,) => {}
| ^^^^ no value can reach this
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:19:9
|
2024-07-24 06:40:04 +00:00
LL | (1 | 2,) => {}
| ^^^^^^^^ no value can reach this
2024-07-24 06:40:04 +00:00
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:19:9
|
LL | (1,) => {}
| ---- matches some of the same values
LL | (2,) => {}
| ---- matches some of the same values
LL | (1 | 2,) => {}
2024-07-24 06:40:04 +00:00
| ^^^^^^^^ collectively making this unreachable
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:24:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the relevant values
LL | (1, 3) => {}
| ^^^^^^ no value can reach this
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:25:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the relevant values
LL | (1, 3) => {}
LL | (1, 4) => {}
| ^^^^^^ no value can reach this
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:26:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the relevant values
...
LL | (2, 4) => {}
| ^^^^^^ no value can reach this
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:27:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the relevant values
...
LL | (2 | 1, 4) => {}
| ^^^^^^^^^^ no value can reach this
error: unreachable pattern
2023-11-04 03:25:35 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:29:9
|
2024-07-24 06:40:04 +00:00
LL | (1, 4 | 5) => {}
| ^^^^^^^^^^ no value can reach this
2024-07-24 06:40:04 +00:00
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:29:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches some of the same values
...
LL | (1, 5 | 6) => {}
| ---------- matches some of the same values
LL | (1, 4 | 5) => {}
2024-07-24 06:40:04 +00:00
| ^^^^^^^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:34:13
|
LL | (0, 0, 0) => {}
| - matches all the relevant values
LL | (0, 0 | 1, 0) => {}
| ^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:42:9
|
LL | (None | Some(1 | 2),) => {}
| --------------------- matches all the relevant values
LL | (Some(1),) => {}
| ^^^^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:43:9
|
LL | (None | Some(1 | 2),) => {}
| --------------------- matches all the relevant values
LL | (Some(1),) => {}
LL | (None,) => {}
| ^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:48:9
|
LL | ((1 | 2,) | (3 | 4,),) => {}
| ---------------------- matches all the relevant values
2019-12-27 17:53:00 +00:00
LL | ((1..=4,),) => {}
| ^^^^^^^^^^^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:53:14
|
2019-12-27 17:53:00 +00:00
LL | (1 | 1,) => {}
| - ^ no value can reach this
| |
| matches all the relevant values
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:57:19
2021-01-02 22:38:18 +00:00
|
LL | (0 | 1) | 1 => {}
| - ^ no value can reach this
| |
| matches all the relevant values
2021-01-02 22:38:18 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:63:14
2021-01-02 22:38:18 +00:00
|
LL | 0 | (0 | 0) => {}
| - ^ no value can reach this
| |
| matches all the relevant values
2021-01-01 22:14:22 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:63:18
2021-01-01 22:14:22 +00:00
|
LL | 0 | (0 | 0) => {}
| - ^ no value can reach this
| |
| matches all the relevant values
2021-01-02 22:38:18 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:71:13
2021-01-02 22:38:18 +00:00
|
LL | Some(0) |
| ------- matches all the relevant values
2021-01-02 22:38:18 +00:00
LL | / Some(
LL | | 0 | 0) => {}
| |______________________^ no value can reach this
2021-01-02 22:38:18 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:77:15
|
LL | [0
| - matches all the relevant values
LL | | 0
| ^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:79:15
|
LL | , 0
| - matches all the relevant values
LL | | 0] => {}
| ^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:83:20
2023-11-04 03:25:35 +00:00
|
LL | (true, 0 | 0) => {}
| - ^ no value can reach this
| |
| matches all the relevant values
2023-11-04 03:25:35 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:84:17
2023-11-04 03:25:35 +00:00
|
2024-07-24 06:40:04 +00:00
LL | (_, 0 | 0) => {}
| ^ no value can reach this
2024-07-24 06:40:04 +00:00
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:84:17
|
LL | (true, 0 | 0) => {}
| - matches some of the same values
2023-11-04 03:25:35 +00:00
LL | (_, 0 | 0) => {}
2024-07-24 06:40:04 +00:00
| - ^ collectively making this unreachable
| |
| matches some of the same values
2023-11-04 03:25:35 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:92:10
|
LL | [1, ..] => {}
| - matches all the relevant values
LL | [1
| ^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:104:10
2020-12-17 00:42:49 +00:00
|
LL | [true, ..] => {}
| ---- matches all the relevant values
2020-12-17 00:42:49 +00:00
LL | [true
| ^^^^ no value can reach this
2020-12-17 00:42:49 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:111:36
|
2024-07-24 06:40:04 +00:00
LL | (true | false, None | Some(true
| ^^^^ no value can reach this
2024-07-24 06:40:04 +00:00
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:111:36
|
LL | (true, Some(_)) => {}
| - matches some of the same values
LL | (false, Some(true)) => {}
| ---- matches some of the same values
LL | (true | false, None | Some(true
2024-07-24 06:40:04 +00:00
| ^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:116:14
|
LL | (true
| ^^^^ no value can reach this
...
2024-07-24 06:40:04 +00:00
LL | (true | false, None | Some(t_or_f!())) => {}
| --------- in this macro invocation
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:116:14
|
LL | (true
| ^^^^ collectively making this unreachable
...
LL | (true, Some(_)) => {}
| - matches some of the same values
LL | (false, Some(true)) => {}
| ---- matches some of the same values
LL | (true | false, None | Some(t_or_f!())) => {}
| --------- in this macro invocation
= note: this error originates in the macro `t_or_f` (in Nightly builds, run with -Z macro-backtrace for more info)
2020-12-17 00:42:49 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:127:14
|
LL | Some(0) => {}
| - matches all the relevant values
LL | Some(0
| ^ no value can reach this
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:146:19
|
LL | Some(false) => {}
| ----- matches all the relevant values
LL | None | Some(true
LL | | false) => {}
| ^^^^^ no value can reach this
2020-07-02 20:49:58 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:154:15
2020-07-02 20:49:58 +00:00
|
2024-07-24 06:40:04 +00:00
LL | | true) => {}
| ^^^^ no value can reach this
2024-07-24 06:40:04 +00:00
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:154:15
|
LL | (false, true) => {}
| ---- matches some of the same values
LL | (true, true) => {}
| ---- matches some of the same values
LL | (false | true, false
2020-07-02 20:49:58 +00:00
LL | | true) => {}
2024-07-24 06:40:04 +00:00
| ^^^^ collectively making this unreachable
2020-07-02 20:49:58 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:160:15
2020-07-02 20:49:58 +00:00
|
2024-07-24 06:40:04 +00:00
LL | | true,
| ^^^^ no value can reach this
2024-07-24 06:40:04 +00:00
|
note: multiple earlier patterns match some of the same values
2024-07-24 06:40:04 +00:00
--> $DIR/exhaustiveness-unreachable-pattern.rs:160:15
|
LL | (true, false) => {}
| ---- matches some of the same values
LL | (true, true) => {}
| ---- matches some of the same values
LL | (false
2020-07-02 20:49:58 +00:00
LL | | true,
2024-07-24 06:40:04 +00:00
| ^^^^ collectively making this unreachable
2020-07-02 20:49:58 +00:00
2023-11-04 03:25:35 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:165:15
2023-11-04 03:25:35 +00:00
|
LL | (x, y)
| ------ matches any value
2023-11-04 03:25:35 +00:00
LL | | (y, x) => {}
| ^^^^^^ no value can reach this
2023-11-04 03:25:35 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:169:30
|
LL | fn unreachable_in_param((_ | (_, _)): (bool, bool)) {}
| - ^^^^^^ no value can reach this
| |
| matches any value
2024-01-18 14:06:46 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:176:14
2024-01-18 14:06:46 +00:00
|
LL | let (_ | (_, _)) = bool_pair;
| - ^^^^^^ no value can reach this
| |
| matches any value
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:178:14
|
2024-01-18 14:06:46 +00:00
LL | for (_ | (_, _)) in [bool_pair] {}
| - ^^^^^^ no value can reach this
| |
| matches any value
2024-01-18 14:06:46 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:181:20
2024-01-18 14:06:46 +00:00
|
LL | let (Some(_) | Some(true)) = bool_option else { return };
| ------- ^^^^^^^^^^ no value can reach this
| |
| matches all the relevant values
2024-01-18 14:06:46 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:183:22
2024-01-18 14:06:46 +00:00
|
LL | if let Some(_) | Some(true) = bool_option {}
| ------- ^^^^^^^^^^ no value can reach this
| |
| matches all the relevant values
2024-01-18 14:06:46 +00:00
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:185:25
2024-01-18 14:06:46 +00:00
|
LL | while let Some(_) | Some(true) = bool_option {}
| ------- ^^^^^^^^^^ no value can reach this
| |
| matches all the relevant values
2024-01-18 14:06:46 +00:00
error: aborting due to 36 previous errors