1 error: indexing may panic.
2 --> $DIR/indexing_slicing.rs:11:5
7 = note: `-D 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.rs:12:6
16 = help: Consider using `.get(n..)` or .get_mut(n..)` instead
18 error: slicing may panic.
19 --> $DIR/indexing_slicing.rs:13:6
24 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
26 error: slicing may panic.
27 --> $DIR/indexing_slicing.rs:14:6
29 14 | &x[index_from..index_to];
30 | ^^^^^^^^^^^^^^^^^^^^^^^
32 = help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
34 error: slicing may panic.
35 --> $DIR/indexing_slicing.rs:15:6
37 15 | &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
40 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
42 error: slicing may panic.
43 --> $DIR/indexing_slicing.rs:15:6
45 15 | &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
48 = help: Consider using `.get(n..)` or .get_mut(n..)` instead
50 error: range is out of bounds
51 --> $DIR/indexing_slicing.rs:18:6
56 = note: `-D out-of-bounds-indexing` implied by `-D warnings`
58 error: range is out of bounds
59 --> $DIR/indexing_slicing.rs:19:6
64 error: slicing may panic.
65 --> $DIR/indexing_slicing.rs:20:6
67 20 | &x[5..][..10]; // Two lint reports, one for [5..] and another for [..10].
70 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
72 error: range is out of bounds
73 --> $DIR/indexing_slicing.rs:20:6
75 20 | &x[5..][..10]; // Two lint reports, one for [5..] and another for [..10].
78 error: range is out of bounds
79 --> $DIR/indexing_slicing.rs:21:6
84 error: range is out of bounds
85 --> $DIR/indexing_slicing.rs:22:6
90 error: range is out of bounds
91 --> $DIR/indexing_slicing.rs:23:6
93 23 | &x[5..].iter().map(|x| 2 * x).collect::<Vec<i32>>();
96 error: range is out of bounds
97 --> $DIR/indexing_slicing.rs:24:6
102 error: slicing may panic.
103 --> $DIR/indexing_slicing.rs:25:6
108 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
110 error: slicing may panic.
111 --> $DIR/indexing_slicing.rs:26:6
116 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
118 error: indexing may panic.
119 --> $DIR/indexing_slicing.rs:39:5
124 = help: Consider using `.get(n)` or `.get_mut(n)` instead
126 error: slicing may panic.
127 --> $DIR/indexing_slicing.rs:40:6
132 = help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
134 error: slicing may panic.
135 --> $DIR/indexing_slicing.rs:41:6
140 = help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
142 error: slicing may panic.
143 --> $DIR/indexing_slicing.rs:42:6
148 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
150 error: range is out of bounds
151 --> $DIR/indexing_slicing.rs:48:6
156 error: range is out of bounds
157 --> $DIR/indexing_slicing.rs:49:6
162 error: range is out of bounds
163 --> $DIR/indexing_slicing.rs:50:6
168 error: range is out of bounds
169 --> $DIR/indexing_slicing.rs:51:6
174 error: range is out of bounds
175 --> $DIR/indexing_slicing.rs:52:6
180 error: range is out of bounds
181 --> $DIR/indexing_slicing.rs:53:6
186 error: range is out of bounds
187 --> $DIR/indexing_slicing.rs:54:6
192 error: indexing may panic.
193 --> $DIR/indexing_slicing.rs:62:5
198 = help: Consider using `.get(n)` or `.get_mut(n)` instead
200 error: indexing may panic.
201 --> $DIR/indexing_slicing.rs:63:5
206 = help: Consider using `.get(n)` or `.get_mut(n)` instead
208 error: indexing may panic.
209 --> $DIR/indexing_slicing.rs:64:5
214 = help: Consider using `.get(n)` or `.get_mut(n)` instead
216 error: slicing may panic.
217 --> $DIR/indexing_slicing.rs:65:6
222 = help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
224 error: slicing may panic.
225 --> $DIR/indexing_slicing.rs:66:6
227 66 | &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
230 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
232 error: range is out of bounds
233 --> $DIR/indexing_slicing.rs:66:6
235 66 | &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
238 error: slicing may panic.
239 --> $DIR/indexing_slicing.rs:67:6
244 = help: Consider using `.get(n..)` or .get_mut(n..)` instead
246 error: slicing may panic.
247 --> $DIR/indexing_slicing.rs:68:6
252 = help: Consider using `.get(..n)`or `.get_mut(..n)` instead
254 error: indexing may panic.
255 --> $DIR/indexing_slicing.rs:80:5
260 = help: Consider using `.get(n)` or `.get_mut(n)` instead
262 error: indexing may panic.
263 --> $DIR/indexing_slicing.rs:81:5
268 = help: Consider using `.get(n)` or `.get_mut(n)` instead
270 error: aborting due to 37 previous errors