2018-10-25 00:59:14 -05:00
|
|
|
error: index out of bounds: the len is 4 but the index is 4
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:16:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:17:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:47:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:78:5
|
2018-10-25 00:59:14 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:11:5
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:12:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:13:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:14:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:15:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:15:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:18:11
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:19:11
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:20:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:20:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:21:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:22:10
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:23:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:24:12
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &x[0..=4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
|
|
error: slicing may panic.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:25:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:26:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:39:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:40:6
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:41:6
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:42:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:48:12
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:49:16
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:50:15
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &empty[..=4];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:51:12
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:52:14
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:53:16
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:54:15
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:62:5
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:63:5
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:64:5
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:65:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:66:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:66:8
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:67:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:68:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:80:5
|
2018-06-15 10:54:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | v[N];
|
2018-06-15 10:54:38 -05:00
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: Consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: indexing may panic.
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:81:5
|
2018-06-15 10:54:38 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | 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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:85:13
|
2018-10-13 15:51:53 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
2019-01-07 15:33:18 -06:00
|
|
|
--> $DIR/indexing_slicing.rs:86:8
|
2018-10-13 15:51:53 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &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
|
|
|
|