fork/rust

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

borsAuto merge of #68568 - pietroalbini:stable-next, r=pietroalbini5e1a799842b

1.41.0
1.1 KiB35 linesraw
1error[E0510]: cannot assign `x` in indexing expression
2  --> $DIR/slice-index-bounds-check-invalidation.rs:36:12
3   |
4LL |     x[1][{ x = y; 2}]
5   |     ----   ^^^^^ cannot assign
6   |     |
7   |     value is immutable in indexing expression
8
9error[E0510]: cannot assign `x` in indexing expression
10  --> $DIR/slice-index-bounds-check-invalidation.rs:50:12
11   |
12LL |     x[1][{ x = y; 2}]
13   |     ----   ^^^^^ cannot assign
14   |     |
15   |     value is immutable in indexing expression
16
17error[E0510]: cannot assign `x` in indexing expression
18  --> $DIR/slice-index-bounds-check-invalidation.rs:64:12
19   |
20LL |     x[1][{ x = y; 2}][0]
21   |     ----   ^^^^^ cannot assign
22   |     |
23   |     value is immutable in indexing expression
24
25error[E0510]: cannot assign `x` in indexing expression
26  --> $DIR/slice-index-bounds-check-invalidation.rs:71:12
27   |
28LL |     x[1][{ x = y; 2}][0]
29   |     ----   ^^^^^ cannot assign
30   |     |
31   |     value is immutable in indexing expression
32
33error: aborting due to 4 previous errors
34
35For more information about this error, try `rustc --explain E0510`.