fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.2 KiB47 linesraw
1error[E0070]: invalid left-hand side of assignment
2  --> $DIR/bad-expr-lhs.rs:2:7
3   |
4LL |     1 = 2;
5   |     - ^
6   |     |
7   |     cannot assign to this expression
8
9error[E0067]: invalid left-hand side of assignment
10  --> $DIR/bad-expr-lhs.rs:3:7
11   |
12LL |     1 += 2;
13   |     - ^^
14   |     |
15   |     cannot assign to this expression
16
17error[E0070]: invalid left-hand side of assignment
18  --> $DIR/bad-expr-lhs.rs:4:12
19   |
20LL |     (1, 2) = (3, 4);
21   |     ------ ^
22   |     |
23   |     cannot assign to this expression
24
25error[E0070]: invalid left-hand side of assignment
26  --> $DIR/bad-expr-lhs.rs:7:12
27   |
28LL |     (a, b) = (3, 4);
29   |     ------ ^
30   |     |
31   |     cannot assign to this expression
32   |
33   = note: destructuring assignments are not currently supported
34   = note: for more information, see https://github.com/rust-lang/rfcs/issues/372
35
36error[E0070]: invalid left-hand side of assignment
37  --> $DIR/bad-expr-lhs.rs:9:10
38   |
39LL |     None = Some(3);
40   |     ---- ^
41   |     |
42   |     cannot assign to this expression
43
44error: aborting due to 5 previous errors
45
46Some errors have detailed explanations: E0067, E0070.
47For more information about an error, try `rustc --explain E0067`.