]> git.lizzy.rs Git - rust.git/blob - src/test/ui/borrowck/slice-index-bounds-check-invalidation.stderr
Do not use a suggestion to change a binding's name to a type
[rust.git] / src / test / ui / borrowck / slice-index-bounds-check-invalidation.stderr
1 error[E0510]: cannot assign `x` in indexing expression
2   --> $DIR/slice-index-bounds-check-invalidation.rs:36:12
3    |
4 LL |     x[1][{ x = y; 2}]
5    |     ----   ^^^^^ cannot assign
6    |     |
7    |     value is immutable in indexing expression
8
9 error[E0510]: cannot assign `x` in indexing expression
10   --> $DIR/slice-index-bounds-check-invalidation.rs:50:12
11    |
12 LL |     x[1][{ x = y; 2}]
13    |     ----   ^^^^^ cannot assign
14    |     |
15    |     value is immutable in indexing expression
16
17 error[E0510]: cannot assign `x` in indexing expression
18   --> $DIR/slice-index-bounds-check-invalidation.rs:64:12
19    |
20 LL |     x[1][{ x = y; 2}][0]
21    |     ----   ^^^^^ cannot assign
22    |     |
23    |     value is immutable in indexing expression
24
25 error[E0510]: cannot assign `x` in indexing expression
26   --> $DIR/slice-index-bounds-check-invalidation.rs:71:12
27    |
28 LL |     x[1][{ x = y; 2}][0]
29    |     ----   ^^^^^ cannot assign
30    |     |
31    |     value is immutable in indexing expression
32
33 error: aborting due to 4 previous errors
34
35 For more information about this error, try `rustc --explain E0510`.