fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1// run-rustfix 2 3pub fn pre_regular() { 4 let mut i = 0; 5 i += 1; //~ ERROR Rust has no prefix increment operator 6 println!("{}", i); 7} 8 9pub fn pre_while() { 10 let mut i = 0; 11 while { i += 1; i } < 5 { 12 //~^ ERROR Rust has no prefix increment operator 13 println!("{}", i); 14 } 15} 16 17pub fn pre_regular_tmp() { 18 let mut tmp = 0; 19 tmp += 1; //~ ERROR Rust has no prefix increment operator 20 println!("{}", tmp); 21} 22 23pub fn pre_while_tmp() { 24 let mut tmp = 0; 25 while { tmp += 1; tmp } < 5 { 26 //~^ ERROR Rust has no prefix increment operator 27 println!("{}", tmp); 28 } 29} 30 31fn main() {}