File tree Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Expand file tree Collapse file tree 2 files changed +18
-10
lines changed Original file line number Diff line number Diff line change 1- error: leading `+` is not supported
2- --> $DIR/issue-36499.rs:4:9
1+ error: Rust has no postfix increment operator
2+ --> $DIR/issue-36499.rs:4:7
33 |
44LL | 2 + +2;
5- | ^ unexpected `+`
5+ | ^^^ not a valid postfix operator
66 |
7- help: try removing the `+`
7+ help: use `+= 1` instead
8+ |
9+ LL | { let tmp = 2 ; 2 += 1; tmp }2;
10+ | +++++++++++ ~~~~~~~~~~~~~~~
11+ help: or, if you don't need to use it as an expression, change it to this
812 |
913LL - 2 + +2;
10- LL + 2 + 2 ;
14+ LL + 2 += 12 ;
1115 |
1216
1317error: aborting due to previous error
Original file line number Diff line number Diff line change @@ -10,16 +10,20 @@ LL - let _ = +1;
1010LL + let _ = 1;
1111 |
1212
13- error: leading `+` is not supported
14- --> $DIR/issue-88276-unary-plus.rs:5:20
13+ error: Rust has no postfix increment operator
14+ --> $DIR/issue-88276-unary-plus.rs:5:18
1515 |
1616LL | let _ = (1.0 + +2.0) * +3.0;
17- | ^ unexpected `+`
17+ | ^^^ not a valid postfix operator
1818 |
19- help: try removing the `+`
19+ help: use `+= 1` instead
20+ |
21+ LL | let _ = ({ let tmp = 1.0 ; 1.0 += 1; tmp }2.0) * +3.0;
22+ | +++++++++++ ~~~~~~~~~~~~~~~~~
23+ help: or, if you don't need to use it as an expression, change it to this
2024 |
2125LL - let _ = (1.0 + +2.0) * +3.0;
22- LL + let _ = (1.0 + 2 .0) * +3.0;
26+ LL + let _ = (1.0 += 12 .0) * +3.0;
2327 |
2428
2529error: leading `+` is not supported
You can’t perform that action at this time.
0 commit comments