mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
41e8d152dc
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
18 lines
357 B
Text
18 lines
357 B
Text
error: struct literals are not allowed here
|
|
--> $DIR/struct-literal-in-match-discriminant.rs:6:11
|
|
|
|
|
LL | match Foo {
|
|
| ___________^
|
|
LL | | x: 3
|
|
LL | | } {
|
|
| |_____^
|
|
|
|
|
help: surround the struct literal with parentheses
|
|
|
|
|
LL ~ match (Foo {
|
|
LL | x: 3
|
|
LL ~ }) {
|
|
|
|
|
|
|
error: aborting due to 1 previous error
|
|
|