Created
March 1, 2021 21:57
-
-
Save simonholm/c5bbfc8713fd99e71c7f46695d7d9c19 to your computer and use it in GitHub Desktop.
rustlings compiler error enums3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Compiling of exercises/enums/enums3.rs failed! Please try again. Here's the output: | |
error[E0423]: expected function, tuple struct or tuple variant, found struct variant `Message::Move` | |
--> exercises/enums/enums3.rs:67:23 | |
| | |
9 | Move { x: u8, y: u8 }, | |
| --------------------- `Message::Move` defined here | |
... | |
67 | state.process(Message::Move(Point{ x: 10, y: 15 })); | |
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use struct literal syntax instead: `Message::Move { x: val, y: val }` | |
error: aborting due to previous error | |
For more information about this error, try `rustc --explain E0423`. | |
Type 'hint' to get help |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment