blob: fef3fcde7b79941424b48a7374d08715cd769782 [file] [log] [blame] [edit]
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/ch18-00-patterns.html>
help: consider moving the expression to a match arm guard
|
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 => {}
|
help: consider wrapping the expression in an inline `const` (requires `#![feature(inline_const_pat)]`)
|
LL | const { tmp[0] } => {}
| +++++++ +
error: aborting due to 1 previous error