]> git.proxmox.com Git - rustc.git/blob - src/test/ui/parser/increment-autofix.fixed
Update unsuspicious file list
[rustc.git] / src / test / ui / parser / increment-autofix.fixed
1 // run-rustfix
2
3 pub fn pre_regular() {
4 let mut i = 0;
5 i += 1; //~ ERROR Rust has no prefix increment operator
6 println!("{}", i);
7 }
8
9 pub 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
17 pub fn pre_regular_tmp() {
18 let mut tmp = 0;
19 tmp += 1; //~ ERROR Rust has no prefix increment operator
20 println!("{}", tmp);
21 }
22
23 pub 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
31 fn main() {}