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