Open
Description
What is wrong?
We currently can't easily compare tuples with the ==
operator. E.g. the following doesn't work.
if get_tuple() == (1, 2) {
...
}
Instead what we have to do is:
if get_tuple() == (1, 2) {
...
}
let (val1, val2): (u8, u8) = get_tuple()
if val1 == 1 and val2 == 2 {
}
How can it be fixed
We can probably tackle that at MIR lowering
Make PartialEq
and Eq
traits possible and use them for this.