2018-10-25 00:59:14 -05:00
|
|
|
error: index out of bounds: the len is 4 but the index is 4
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:25:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
25 | x[4]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
|
2018-10-25 00:59:14 -05:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= note: #[deny(const_err)] on by default
|
|
|
|
|
|
|
|
error: index out of bounds: the len is 4 but the index is 8
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:26:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
26 | x[1 << 3]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
|
2018-10-25 00:59:14 -05:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
error: index out of bounds: the len is 0 but the index is 0
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:56:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
56 | empty[0]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
|
2018-10-25 00:59:14 -05:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
error: index out of bounds: the len is 4 but the index is 15
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:87:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
87 | x[N]; // Ok, let rustc's `const_err` lint handle `usize` indexing on arrays.
|
2018-10-25 00:59:14 -05:00
|
|
|
| ^^^^
|
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:20:5
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
20 | x[index];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
|
2018-06-13 18:28:57 -05:00
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:21:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
21 | &x[index..];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
= help: Consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:22:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
22 | &x[..index];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:23:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
23 | &x[index_from..index_to];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
= help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:24:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
24 | &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:24:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
24 | &x[index_from..][..index_to]; // Two lint reports, one for [index_from..] and another for [..index_to].
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
= help: Consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:27:11
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
27 | &x[..=4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-06-19 16:30:43 -05:00
|
|
|
|
|
2018-08-01 09:30:44 -05:00
|
|
|
= note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings`
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:28:11
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
28 | &x[1..5];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:29:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
29 | &x[5..][..10]; // Two lint reports, one for [5..] and another for [..10].
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:29:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
29 | &x[5..][..10]; // Two lint reports, one for [5..] and another for [..10].
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2017-05-17 07:19:44 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:30:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
30 | &x[5..];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2018-05-22 23:56:02 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:31:10
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
31 | &x[..5];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-14 11:41:56 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:32:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
32 | &x[5..].iter().map(|x| 2 * x).collect::<Vec<i32>>();
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:33:12
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
33 | &x[0..=4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:34:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
34 | &x[0..][..3];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
|
|
|
|
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:35:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
35 | &x[1..][..5];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:48:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
48 | y[0];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:49:6
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
49 | &y[1..2];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:50:6
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
50 | &y[0..=4];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
|
|
|
|
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:51:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
51 | &y[..=4];
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:57:12
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
57 | &empty[1..5];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:58:16
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
58 | &empty[0..=4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:59:15
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
59 | &empty[..=4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:60:12
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
60 | &empty[1..];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-14 11:41:56 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:61:14
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
61 | &empty[..4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:62:16
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
62 | &empty[0..=0];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:63:15
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
63 | &empty[..=0];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:71:5
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
71 | v[0];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:72:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
72 | v[10];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-14 15:04:37 -05:00
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:73:5
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
73 | v[1 << 3];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:74:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
74 | &v[10..100];
|
2017-05-17 07:19:44 -05:00
|
|
|
| ^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:75:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
75 | &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:75:8
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
75 | &x[10..][..100]; // Two lint reports, one for [10..] and another for [..100].
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:76:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
76 | &v[10..];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-13 18:28:57 -05:00
|
|
|
error: slicing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:77:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
77 | &v[..100];
|
2018-05-22 23:56:02 -05:00
|
|
|
| ^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
|
|
|
= help: Consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2018-06-15 10:54:38 -05:00
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:89:5
|
2018-06-15 10:54:38 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
89 | v[N];
|
2018-06-15 10:54:38 -05:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: indexing may panic.
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:90:5
|
2018-06-15 10:54:38 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
90 | v[M];
|
2018-06-15 10:54:38 -05:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
2018-10-13 15:51:53 -05:00
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:94:13
|
2018-10-13 15:51:53 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
94 | &x[num..10]; // should trigger out of bounds error
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^^
|
2018-10-13 15:51:53 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2018-12-09 23:27:19 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:95:8
|
2018-10-13 15:51:53 -05:00
|
|
|
|
|
2018-12-09 23:27:19 -06:00
|
|
|
95 | &x[10..num]; // should trigger out of bounds error
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^^
|
2018-10-13 15:51:53 -05:00
|
|
|
|
2018-10-25 00:59:14 -05:00
|
|
|
error: aborting due to 43 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|