rust/tests/ui/or-patterns/exhaustiveness-unreachable-pattern.stderr
2024-07-24 08:46:52 +02:00

369 lines
12 KiB
Plaintext

error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:8:9
|
LL | (1 | 2,) => {}
| -------- matches all the values already
LL | (1,) => {}
| ^^^^ unreachable pattern
|
note: the lint level is defined here
--> $DIR/exhaustiveness-unreachable-pattern.rs:1:9
|
LL | #![deny(unreachable_patterns)]
| ^^^^^^^^^^^^^^^^^^^^
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:13:9
|
LL | (1 | 2,) => {}
| -------- matches all the values already
LL | (2,) => {}
| ^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:19:9
|
LL | (1 | 2,) => {}
| ^^^^^^^^ unreachable pattern
|
note: these patterns collectively make the last one unreachable
--> $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,) => {}
| ^^^^^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:24:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the values already
LL | (1, 3) => {}
| ^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:25:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the values already
LL | (1, 3) => {}
LL | (1, 4) => {}
| ^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:26:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the values already
...
LL | (2, 4) => {}
| ^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:27:9
|
LL | (1 | 2, 3 | 4) => {}
| -------------- matches all the values already
...
LL | (2 | 1, 4) => {}
| ^^^^^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:29:9
|
LL | (1, 4 | 5) => {}
| ^^^^^^^^^^ unreachable pattern
|
note: these patterns collectively make the last one unreachable
--> $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) => {}
| ^^^^^^^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:34:13
|
LL | (0, 0, 0) => {}
| - matches all the values already
LL | (0, 0 | 1, 0) => {}
| ^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:42:9
|
LL | (None | Some(1 | 2),) => {}
| --------------------- matches all the values already
LL | (Some(1),) => {}
| ^^^^^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:43:9
|
LL | (None | Some(1 | 2),) => {}
| --------------------- matches all the values already
LL | (Some(1),) => {}
LL | (None,) => {}
| ^^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:48:9
|
LL | ((1 | 2,) | (3 | 4,),) => {}
| ---------------------- matches all the values already
LL | ((1..=4,),) => {}
| ^^^^^^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:53:14
|
LL | (1 | 1,) => {}
| - ^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:57:19
|
LL | (0 | 1) | 1 => {}
| - ^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:63:14
|
LL | 0 | (0 | 0) => {}
| - ^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:63:18
|
LL | 0 | (0 | 0) => {}
| - ^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:71:13
|
LL | Some(0) |
| ------- matches all the values already
LL | / Some(
LL | | 0 | 0) => {}
| |______________________^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:77:15
|
LL | [0
| - matches all the values already
LL | | 0
| ^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:79:15
|
LL | , 0
| - matches all the values already
LL | | 0] => {}
| ^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:83:20
|
LL | (true, 0 | 0) => {}
| - ^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:84:17
|
LL | (_, 0 | 0) => {}
| ^ unreachable pattern
|
note: these patterns collectively make the last one unreachable
--> $DIR/exhaustiveness-unreachable-pattern.rs:84:17
|
LL | (true, 0 | 0) => {}
| - matches some of the same values
LL | (_, 0 | 0) => {}
| - ^ collectively making this unreachable
| |
| matches some of the same values
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:92:10
|
LL | [1, ..] => {}
| - matches all the values already
LL | [1
| ^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:104:10
|
LL | [true, ..] => {}
| ---- matches all the values already
LL | [true
| ^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:111:36
|
LL | (true | false, None | Some(true
| ^^^^ unreachable pattern
|
note: these patterns collectively make the last one unreachable
--> $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
| ^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:116:14
|
LL | (true
| ^^^^ unreachable pattern
...
LL | (true | false, None | Some(t_or_f!())) => {}
| --------- in this macro invocation
|
note: these patterns collectively make the last one unreachable
--> $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)
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:127:14
|
LL | Some(0) => {}
| - matches all the values already
LL | Some(0
| ^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:146:19
|
LL | Some(false) => {}
| ----- matches all the values already
LL | None | Some(true
LL | | false) => {}
| ^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:154:15
|
LL | | true) => {}
| ^^^^ unreachable pattern
|
note: these patterns collectively make the last one unreachable
--> $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
LL | | true) => {}
| ^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:160:15
|
LL | | true,
| ^^^^ unreachable pattern
|
note: these patterns collectively make the last one unreachable
--> $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
LL | | true,
| ^^^^ collectively making this unreachable
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:165:15
|
LL | (x, y)
| ------ matches any value
LL | | (y, x) => {}
| ^^^^^^ unreachable pattern
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:169:30
|
LL | fn unreachable_in_param((_ | (_, _)): (bool, bool)) {}
| - ^^^^^^ unreachable pattern
| |
| matches any value
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:176:14
|
LL | let (_ | (_, _)) = bool_pair;
| - ^^^^^^ unreachable pattern
| |
| matches any value
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:178:14
|
LL | for (_ | (_, _)) in [bool_pair] {}
| - ^^^^^^ unreachable pattern
| |
| matches any value
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:181:20
|
LL | let (Some(_) | Some(true)) = bool_option else { return };
| ------- ^^^^^^^^^^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:183:22
|
LL | if let Some(_) | Some(true) = bool_option {}
| ------- ^^^^^^^^^^ unreachable pattern
| |
| matches all the values already
error: unreachable pattern
--> $DIR/exhaustiveness-unreachable-pattern.rs:185:25
|
LL | while let Some(_) | Some(true) = bool_option {}
| ------- ^^^^^^^^^^ unreachable pattern
| |
| matches all the values already
error: aborting due to 36 previous errors