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