]> git.lizzy.rs Git - rust.git/blob - tests/ui/indexing_slicing_index.stderr
Auto merge of #9622 - llogiq:box-dyn-default, r=Alexendoo
[rust.git] / tests / ui / indexing_slicing_index.stderr
1 error[E0080]: evaluation of `main::{constant#3}` failed
2   --> $DIR/indexing_slicing_index.rs:31:14
3    |
4 LL |     const { &ARR[idx4()] }; // Ok, let rustc handle const contexts.
5    |              ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
6
7 error[E0080]: erroneous constant used
8   --> $DIR/indexing_slicing_index.rs:31:5
9    |
10 LL |     const { &ARR[idx4()] }; // Ok, let rustc handle const contexts.
11    |     ^^^^^^^^^^^^^^^^^^^^^^ referenced constant has errors
12
13 error: indexing may panic
14   --> $DIR/indexing_slicing_index.rs:22:5
15    |
16 LL |     x[index];
17    |     ^^^^^^^^
18    |
19    = help: consider using `.get(n)` or `.get_mut(n)` instead
20    = note: `-D clippy::indexing-slicing` implied by `-D warnings`
21
22 error: indexing may panic
23   --> $DIR/indexing_slicing_index.rs:38:5
24    |
25 LL |     v[0];
26    |     ^^^^
27    |
28    = help: consider using `.get(n)` or `.get_mut(n)` instead
29
30 error: indexing may panic
31   --> $DIR/indexing_slicing_index.rs:39:5
32    |
33 LL |     v[10];
34    |     ^^^^^
35    |
36    = help: consider using `.get(n)` or `.get_mut(n)` instead
37
38 error: indexing may panic
39   --> $DIR/indexing_slicing_index.rs:40:5
40    |
41 LL |     v[1 << 3];
42    |     ^^^^^^^^^
43    |
44    = help: consider using `.get(n)` or `.get_mut(n)` instead
45
46 error: indexing may panic
47   --> $DIR/indexing_slicing_index.rs:46:5
48    |
49 LL |     v[N];
50    |     ^^^^
51    |
52    = help: consider using `.get(n)` or `.get_mut(n)` instead
53
54 error: indexing may panic
55   --> $DIR/indexing_slicing_index.rs:47:5
56    |
57 LL |     v[M];
58    |     ^^^^
59    |
60    = help: consider using `.get(n)` or `.get_mut(n)` instead
61
62 error[E0080]: evaluation of constant value failed
63   --> $DIR/indexing_slicing_index.rs:10:24
64    |
65 LL | const REF_ERR: &i32 = &ARR[idx4()]; // Ok, let rustc handle const contexts.
66    |                        ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
67
68 error: aborting due to 9 previous errors
69
70 For more information about this error, try `rustc --explain E0080`.