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
$ rustc lets-play-bool.rs
error[E0369]: binary operation `!=` cannot be applied to type `Enum1`
--> lets-play-bool.rs:16:8
|
16 | ifmayFail() != 0{
| ^^^^^^^^^
|
= note: an implementation of `std::cmp::PartialEq` might be missing for `Enum1`
error: aborting due to previous error
The text was updated successfully, but these errors were encountered:
skade
changed the title
Wrong code generation when using the zero veriant of an enum
Wrong code generation when using the zero variant of an enum in if clauses
Jul 4, 2017
The following code:
is converted to:
which doesn't compile due to this:
This implementation would work:
The text was updated successfully, but these errors were encountered: