mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-07 09:13:07 +03:00
1bd997a452
Split invalid-compile-flags into run-pass & invalid Update tests/ui/README.md
30 lines
907 B
Rust
30 lines
907 B
Rust
//! 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
|
|
}
|