summaryrefslogtreecommitdiffstats
path: root/tests/ui/borrowck/slice-index-bounds-check-invalidation.stderr
blob: f9ed16f19cd69f4723a36c373ab0df698d04cef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
error[E0510]: cannot assign `x` in indexing expression
  --> $DIR/slice-index-bounds-check-invalidation.rs:36:12
   |
LL |     x[1][{ x = y; 2}]
   |     ----   ^^^^^ cannot assign
   |     |
   |     value is immutable in indexing expression

error[E0510]: cannot assign `x` in indexing expression
  --> $DIR/slice-index-bounds-check-invalidation.rs:50:12
   |
LL |     x[1][{ x = y; 2}]
   |     ----   ^^^^^ cannot assign
   |     |
   |     value is immutable in indexing expression

error[E0510]: cannot assign `x` in indexing expression
  --> $DIR/slice-index-bounds-check-invalidation.rs:64:12
   |
LL |     x[1][{ x = y; 2}][0]
   |     ----   ^^^^^ cannot assign
   |     |
   |     value is immutable in indexing expression

error[E0510]: cannot assign `x` in indexing expression
  --> $DIR/slice-index-bounds-check-invalidation.rs:71:12
   |
LL |     x[1][{ x = y; 2}][0]
   |     ----   ^^^^^ cannot assign
   |     |
   |     value is immutable in indexing expression

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0510`.