Closed

Description
Consider the following code:
let a = 0b11;
let b = match a {
0b01 | 0b10 => true,
_ => false
};
io::println(b.to_str());
The output is false
, but let b = (a == 0b01 | 0b10);
yields true
.
I don't know how common patterns containing bitwise ors would be, but it seems inconsistent for this operator to be unavailable when the other arithmetic and bitwise ops function as expected here:
let a = 0b11;
let b = match a {
0b01 + 0b10 => true,
_ => false
};
io::println(b.to_str());
The output is true
.