about summary refs log tree commit diff
path: root/tests/ui/parser/issues/issue-24375.stderr
blob: e96c004fb351603bbb7f685edffe08ac2d772c35 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
error: expected a pattern, found an expression
  --> $DIR/issue-24375.rs:6:9
   |
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 => {}
   |

error: aborting due to 1 previous error