2018-12-04 14:10:32 -05:00
|
|
|
#![feature(type_ascription)]
|
|
|
|
|
2017-06-09 20:30:33 -07:00
|
|
|
fn main() {
|
2018-12-04 14:10:32 -05:00
|
|
|
let a : usize = 0;
|
2017-07-04 02:17:01 +03:00
|
|
|
let long_name : usize = 0;
|
|
|
|
|
|
|
|
println!("{}", a as usize > long_name);
|
2017-11-20 13:13:27 +01:00
|
|
|
println!("{}", a as usize < long_name); //~ ERROR `<` is interpreted as a start of generic
|
2017-07-04 02:17:01 +03:00
|
|
|
println!("{}{}", a as usize < long_name, long_name);
|
2017-11-20 13:13:27 +01:00
|
|
|
//~^ ERROR `<` is interpreted as a start of generic
|
|
|
|
println!("{}", a as usize < 4); //~ ERROR `<` is interpreted as a start of generic
|
2017-07-04 02:17:01 +03:00
|
|
|
println!("{}", a: usize > long_name);
|
|
|
|
println!("{}{}", a: usize < long_name, long_name);
|
2017-11-20 13:13:27 +01:00
|
|
|
//~^ ERROR `<` is interpreted as a start of generic
|
|
|
|
println!("{}", a: usize < 4); //~ ERROR `<` is interpreted as a start of generic
|
2017-06-09 20:30:33 -07:00
|
|
|
|
2017-07-05 16:39:06 -07:00
|
|
|
println!("{}", a
|
|
|
|
as
|
|
|
|
usize
|
2017-11-20 13:13:27 +01:00
|
|
|
< //~ ERROR `<` is interpreted as a start of generic
|
2017-07-05 16:39:06 -07:00
|
|
|
4);
|
|
|
|
println!("{}", a
|
|
|
|
|
|
|
|
|
|
|
|
as
|
|
|
|
|
|
|
|
|
|
|
|
usize
|
2017-11-20 13:13:27 +01:00
|
|
|
< //~ ERROR `<` is interpreted as a start of generic
|
2017-07-05 16:39:06 -07:00
|
|
|
5);
|
2017-07-04 02:17:01 +03:00
|
|
|
|
2022-08-24 22:41:51 +02:00
|
|
|
println!("{}", a as usize << long_name); //~ ERROR `<<` is interpreted as a start of generic
|
2017-10-09 20:02:17 +03:00
|
|
|
|
2017-11-20 13:13:27 +01:00
|
|
|
println!("{}", a: &mut 4); //~ ERROR expected type, found `4`
|
2017-06-09 20:30:33 -07:00
|
|
|
}
|