2024-01-28 16:12:21 +01:00
|
|
|
error: expected a pattern, found an expression
|
|
|
|
|
--> $DIR/issue-24375.rs:6:9
|
2018-10-20 23:36:17 +03:00
|
|
|
|
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | tmp[0] => {}
|
2024-10-06 01:44:59 +00:00
|
|
|
| ^^^^^^ not a pattern
|
2024-09-18 20:38:43 +02:00
|
|
|
|
|
2024-10-30 13:08:08 -06:00
|
|
|
= note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
|
2024-09-18 20:38:43 +02:00
|
|
|
help: consider moving the expression to a match arm guard
|
|
|
|
|
|
|
2024-07-09 22:30:26 +00:00
|
|
|
LL - tmp[0] => {}
|
|
|
|
|
LL + val if val == tmp[0] => {}
|
|
|
|
|
|
|
2024-09-18 20:38:43 +02:00
|
|
|
help: consider extracting the expression into a `const`
|
|
|
|
|
|
|
|
|
|
|
LL + const VAL: /* Type */ = tmp[0];
|
|
|
|
|
LL ~ match z {
|
|
|
|
|
LL ~ VAL => {}
|
|
|
|
|
|
|
2018-10-20 23:36:17 +03:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-10-20 23:36:17 +03:00
|
|
|
|