1 error: slicing may panic
2 --> $DIR/indexing_slicing_slice.rs:12:6
7 = note: `-D clippy::indexing-slicing` implied by `-D warnings`
8 = help: consider using `.get(n..)` or .get_mut(n..)` instead
10 error: slicing may panic
11 --> $DIR/indexing_slicing_slice.rs:13:6
16 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
18 error: slicing may panic
19 --> $DIR/indexing_slicing_slice.rs:14:6
21 LL | &x[index_from..index_to];
22 | ^^^^^^^^^^^^^^^^^^^^^^^
24 = help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
26 error: slicing may panic
27 --> $DIR/indexing_slicing_slice.rs:15:6
29 LL | &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
32 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
34 error: slicing may panic
35 --> $DIR/indexing_slicing_slice.rs:15:6
37 LL | &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
40 = help: consider using `.get(n..)` or .get_mut(n..)` instead
42 error: slicing may panic
43 --> $DIR/indexing_slicing_slice.rs:16:6
45 LL | &x[5..][..10]; // Two lint reports, one for out of bounds [5..] and another for slicing [..10].
48 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
50 error: range is out of bounds
51 --> $DIR/indexing_slicing_slice.rs:16:8
53 LL | &x[5..][..10]; // Two lint reports, one for out of bounds [5..] and another for slicing [..10].
56 = note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings`
58 error: slicing may panic
59 --> $DIR/indexing_slicing_slice.rs:17:6
64 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
66 error: slicing may panic
67 --> $DIR/indexing_slicing_slice.rs:18:6
72 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
74 error: range is out of bounds
75 --> $DIR/indexing_slicing_slice.rs:25:12
80 error: range is out of bounds
81 --> $DIR/indexing_slicing_slice.rs:26:11
86 error: slicing may panic
87 --> $DIR/indexing_slicing_slice.rs:31:6
92 = help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
94 error: slicing may panic
95 --> $DIR/indexing_slicing_slice.rs:32:6
97 LL | &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
100 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
102 error: range is out of bounds
103 --> $DIR/indexing_slicing_slice.rs:32:8
105 LL | &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
108 error: slicing may panic
109 --> $DIR/indexing_slicing_slice.rs:33:6
114 = help: consider using `.get(n..)` or .get_mut(n..)` instead
116 error: slicing may panic
117 --> $DIR/indexing_slicing_slice.rs:34:6
122 = help: consider using `.get(..n)`or `.get_mut(..n)` instead
124 error: aborting due to 16 previous errors