Files
rust/tests/ui/parser/issues/issue-24375.stderr

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

22 lines
589 B
Plaintext
Raw Normal View History

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] => {}
| ^^^^^^ not a pattern
|
= note: arbitrary expressions are not allowed in patterns: <https://doc.rust-lang.org/book/ch19-00-patterns.html>
help: consider moving the expression to a match arm guard
|
LL - tmp[0] => {}
LL + val if val == tmp[0] => {}
|
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
error: aborting due to 1 previous error
2018-10-20 23:36:17 +03:00