mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +00:00
108 lines
2.8 KiB
Plaintext
108 lines
2.8 KiB
Plaintext
error: Rust has no prefix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:3:17
|
|
|
|
|
LL | let _ = i + ++i;
|
|
| ^^ not a valid prefix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = i + { i += 1; i };
|
|
| ~ +++++++++
|
|
|
|
error: Rust has no prefix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:8:13
|
|
|
|
|
LL | let _ = ++i + i;
|
|
| ^^ not a valid prefix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { i += 1; i } + i;
|
|
| ~ +++++++++
|
|
|
|
error: Rust has no prefix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:13:13
|
|
|
|
|
LL | let _ = ++i + ++i;
|
|
| ^^ not a valid prefix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { i += 1; i } + ++i;
|
|
| ~ +++++++++
|
|
|
|
error: Rust has no postfix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:18:18
|
|
|
|
|
LL | let _ = i + i++;
|
|
| ^^ not a valid postfix operator
|
|
|
|
error: Rust has no postfix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:24:14
|
|
|
|
|
LL | let _ = i++ + i;
|
|
| ^^ not a valid postfix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { let tmp = i; i += 1; tmp } + i;
|
|
| +++++++++++ ~~~~~~~~~~~~~~~
|
|
|
|
error: Rust has no postfix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:29:14
|
|
|
|
|
LL | let _ = i++ + i++;
|
|
| ^^ not a valid postfix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { let tmp = i; i += 1; tmp } + i++;
|
|
| +++++++++++ ~~~~~~~~~~~~~~~
|
|
|
|
error: Rust has no prefix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:34:13
|
|
|
|
|
LL | let _ = ++i + i++;
|
|
| ^^ not a valid prefix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { i += 1; i } + i++;
|
|
| ~ +++++++++
|
|
|
|
error: Rust has no postfix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:39:14
|
|
|
|
|
LL | let _ = i++ + ++i;
|
|
| ^^ not a valid postfix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { let tmp = i; i += 1; tmp } + ++i;
|
|
| +++++++++++ ~~~~~~~~~~~~~~~
|
|
|
|
error: Rust has no postfix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:44:24
|
|
|
|
|
LL | let _ = (1 + 2 + i)++;
|
|
| ^^ not a valid postfix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = { let tmp = (1 + 2 + i); (1 + 2 + i) += 1; tmp };
|
|
| +++++++++++ ~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
error: Rust has no postfix increment operator
|
|
--> $DIR/issue-104867-inc-dec-2.rs:49:15
|
|
|
|
|
LL | let _ = (i++ + 1) + 2;
|
|
| ^^ not a valid postfix operator
|
|
|
|
|
help: use `+= 1` instead
|
|
|
|
|
LL | let _ = ({ let tmp = i; i += 1; tmp } + 1) + 2;
|
|
| +++++++++++ ~~~~~~~~~~~~~~~
|
|
|
|
error: aborting due to 10 previous errors
|
|
|