You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following code compiles with no warning or error:
enum x {}
enum y { x }
fn main() {}
However if the positions of the enums are reversed then the compile fails with a (I think bogus) error message:
enum y { x }
enum x {}
fn main() {}
The error message is:
test.rs:5:0: 5:9 error: Duplicate definition of value x
test.rs:5 enum x {}
^~~~~~~~~
test.rs:3:9: 3:10 note: First definition of value x here:
test.rs:3 enum y { x }
^
error: aborting due to previous error
The text was updated successfully, but these errors were encountered:
The following code compiles with no warning or error:
However if the positions of the enums are reversed then the compile fails with a (I think bogus) error message:
The error message is:
The text was updated successfully, but these errors were encountered: