Closed
Description
A simple example
enum Direction {
North,
East,
South,
West
}
fn main (){
println!("{}", North as int < 2)
//Compiles fine with >, >=, <=, == and !=
//but with < I get
//test.rs:9:31: 9:32 error: expected type, found token LIT_INT_UNSUFFIXED(2i64)
//test.rs:9 println!("{}", North as int < 2)
// ^
}
If I use parenthesis
println!("{}", (North as int) < 2)
It compiles.
This is related with issue #11962
Metadata
Metadata
Assignees
Labels
No labels