Skip to content

Instantly share code, notes, and snippets.

@MaikKlein
Created May 25, 2013 13:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MaikKlein/5648988 to your computer and use it in GitHub Desktop.
Save MaikKlein/5648988 to your computer and use it in GitHub Desktop.
enum Expression{
Number,
Add(Option<Expression>,Option<Expression>),
Mult(Option<Expression>,Option<Expression>)
}
/home/maik/hello.rs:1:0: 5:1 error: illegal recursive enum type; wrap the inner value in a box to make it representable
/home/maik/hello.rs:1 enum Expression{
/home/maik/hello.rs:2 Number,
/home/maik/hello.rs:3 Add(Option<Expression>,Option<Expression>),
/home/maik/hello.rs:4 Mult(Option<Expression>,Option<Expression>)
/home/maik/hello.rs:5 }
error: aborting due to previous error
[Finished in 0.3s with exit code 101]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment