Closed
Description
openedon Mar 22, 2014
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels