• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download

test1()1 fn test1() {
2     let mut i = 0;
3     let _ = i + ++i; //~ ERROR Rust has no prefix increment operator
4 }
5 
test2()6 fn test2() {
7     let mut i = 0;
8     let _ = ++i + i; //~ ERROR Rust has no prefix increment operator
9 }
10 
test3()11 fn test3() {
12     let mut i = 0;
13     let _ = ++i + ++i; //~ ERROR Rust has no prefix increment operator
14 }
15 
test4()16 fn test4() {
17     let mut i = 0;
18     let _ = i + i++; //~ ERROR Rust has no postfix increment operator
19     // won't suggest since we can not handle the precedences
20 }
21 
test5()22 fn test5() {
23     let mut i = 0;
24     let _ = i++ + i; //~ ERROR Rust has no postfix increment operator
25 }
26 
test6()27 fn test6() {
28     let mut i = 0;
29     let _ = i++ + i++; //~ ERROR Rust has no postfix increment operator
30 }
31 
test7()32 fn test7() {
33     let mut i = 0;
34     let _ = ++i + i++; //~ ERROR Rust has no prefix increment operator
35 }
36 
test8()37 fn test8() {
38     let mut i = 0;
39     let _ = i++ + ++i; //~ ERROR Rust has no postfix increment operator
40 }
41 
test9()42 fn test9() {
43     let mut i = 0;
44     let _ = (1 + 2 + i)++; //~ ERROR Rust has no postfix increment operator
45 }
46 
test10()47 fn test10() {
48     let mut i = 0;
49     let _ = (i++ + 1) + 2; //~ ERROR Rust has no postfix increment operator
50 }
51 
main()52 fn main() { }
53