Closed
Description
The following used to work from rust 1.0.0 through 1.41.0, but has been failing to compile since 1.42.0. I believe the "`and` is not a logical operator"
diagnostic is being overzealous and should not be triggering on this program.
mod or {
pub const ID: usize = 0;
}
mod and {
pub const ID: usize = 1;
}
fn main() {
match 0 {
or::ID => {}
and::ID => {}
_ => {}
}
}
error: `and` is not a logical operator
--> src/main.rs:12:9
|
12 | and::ID => {}
| ^^^ help: use `&&` to perform logical conjunction
|
= note: unlike in e.g., python and PHP, `&&` and `||` are used for logical operators