rust/tests/ui/destructuring-assignment/bad-expr-lhs.stderr

45 lines
1.0 KiB
Plaintext
Raw Normal View History

2019-12-22 12:42:15 -06:00
error[E0070]: invalid left-hand side of assignment
--> $DIR/bad-expr-lhs.rs:2:7
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | 1 = 2;
| - ^
2019-12-22 12:42:15 -06:00
| |
| cannot assign to this expression
2018-08-08 07:28:26 -05:00
2019-12-22 12:42:15 -06:00
error[E0067]: invalid left-hand side of assignment
--> $DIR/bad-expr-lhs.rs:3:7
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | 1 += 2;
2019-12-22 12:42:15 -06:00
| - ^^
| |
| cannot assign to this expression
2018-08-08 07:28:26 -05:00
2019-12-22 12:42:15 -06:00
error[E0070]: invalid left-hand side of assignment
--> $DIR/bad-expr-lhs.rs:4:12
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | (1, 2) = (3, 4);
| - ^
| |
| cannot assign to this expression
2018-08-08 07:28:26 -05:00
2019-12-22 12:42:15 -06:00
error[E0070]: invalid left-hand side of assignment
--> $DIR/bad-expr-lhs.rs:4:12
|
LL | (1, 2) = (3, 4);
| - ^
| |
| cannot assign to this expression
2018-08-08 07:28:26 -05:00
2019-12-22 12:42:15 -06:00
error[E0070]: invalid left-hand side of assignment
2021-11-03 01:50:57 -05:00
--> $DIR/bad-expr-lhs.rs:8:10
2018-08-08 07:28:26 -05:00
|
2019-03-09 06:03:44 -06:00
LL | None = Some(3);
| ---- ^
2019-12-22 12:42:15 -06:00
| |
| cannot assign to this expression
2018-08-08 07:28:26 -05:00
2021-11-03 01:50:57 -05:00
error: aborting due to 5 previous errors
2018-08-08 07:28:26 -05:00
2021-11-03 01:50:57 -05:00
Some errors have detailed explanations: E0067, E0070.
2018-08-08 07:28:26 -05:00
For more information about an error, try `rustc --explain E0067`.