Skip to content

Instantly share code, notes, and snippets.

@simonholm
Created March 1, 2021 21:57
Show Gist options
  • Save simonholm/c5bbfc8713fd99e71c7f46695d7d9c19 to your computer and use it in GitHub Desktop.
Save simonholm/c5bbfc8713fd99e71c7f46695d7d9c19 to your computer and use it in GitHub Desktop.
rustlings compiler error enums3
! 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