blob: 7c33e7114b4648098cd2a07113971757997dee3b [file]
//! regression test for https://github.com/rust-lang/rust/issues/22644
fn main() {
let a: usize = 0;
let long_name: usize = 0;
println!("{}", a as usize > long_name);
println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic
println!("{}{}", a as usize < long_name, long_name);
//~^ ERROR `<` is interpreted as a start of generic
println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic
println!("{}", a
as
usize
< //~ ERROR `<` is interpreted as a start of generic
4);
println!("{}", a
as
usize
< //~ ERROR `<` is interpreted as a start of generic
5);
println!("{}", a as usize << long_name); //~ ERROR `<<` is interpreted as a start of generic
}
fn foo() {
if 1 as f64 < 0.0 && 1 >= 0 {}
//~^ ERROR `<` is interpreted as a start of generic arguments for `f64`, not a compariso
}