]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui-toml/suppress_lint_in_const/test.stderr
Merge commit '4bdfb0741dbcecd5279a2635c3280726db0604b5' into clippyup
[rust.git] / src / tools / clippy / tests / ui-toml / suppress_lint_in_const / test.stderr
1 error[E0080]: evaluation of `main::{constant#3}` failed
2   --> $DIR/test.rs:31:14
3    |
4 LL |     const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
5    |              ^^^^^^^^^^^ index out of bounds: the length is 2 but the index is 4
6
7 note: erroneous constant used
8   --> $DIR/test.rs:31:5
9    |
10 LL |     const { &ARR[idx4()] }; // Ok, should not produce stderr, since `suppress-restriction-lint-in-const` is set true.
11    |     ^^^^^^^^^^^^^^^^^^^^^^
12
13 error: indexing may panic
14   --> $DIR/test.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/test.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/test.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/test.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/test.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/test.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/test.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 8 previous errors
69
70 For more information about this error, try `rustc --explain E0080`.