2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:94: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
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(n..)` or .get_mut(n..)` instead
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:96: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
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:98: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
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:100:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | &x[index_from..][..index_to];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:100:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | &x[index_from..][..index_to];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:103:6
|
2018-05-22 23:56:02 -05:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | &x[5..][..10];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^
|
2018-06-13 18:28:57 -05:00
|
|
|
|
|
2021-03-12 08:30:50 -06: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
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:103:8
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | &x[5..][..10];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2019-07-16 00:30:23 -05:00
|
|
|
= note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::out_of_bounds_indexing)]`
|
2018-06-14 15:04:37 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:107: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
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-06-14 15:04:37 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:109: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
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-06-14 15:04:37 -05:00
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: range is out of bounds
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:117:12
|
2017-05-17 07:19:44 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &y[0..=4];
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
2020-09-24 07:49:22 -05:00
|
|
|
error: range is out of bounds
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:119:11
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2018-12-27 09:57:55 -06:00
|
|
|
LL | &y[..=4];
|
2020-09-24 07:49:22 -05:00
|
|
|
| ^
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:125: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
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2017-05-17 07:19:44 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:127:6
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | &x[10..][..100];
|
2018-06-14 15:04:37 -05:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:127:8
|
2018-06-14 15:04:37 -05:00
|
|
|
|
|
2023-08-24 14:32:12 -05:00
|
|
|
LL | &x[10..][..100];
|
2018-10-15 06:44:39 -05:00
|
|
|
| ^^
|
2018-06-14 15:04:37 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:130: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
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
error: slicing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:132: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
|
|
|
|
|
2021-03-12 08:30:50 -06:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-22 23:56:02 -05:00
|
|
|
|
2024-03-27 05:13:27 -05:00
|
|
|
error: indexing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:150:5
|
2024-03-27 05:13:27 -05:00
|
|
|
|
|
|
|
|
LL | map_with_get[true];
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: indexing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:153:5
|
2024-03-27 05:13:27 -05:00
|
|
|
|
|
|
|
|
LL | s[0];
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: indexing may panic
|
2024-05-30 08:15:25 -05:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:156:5
|
2024-03-27 05:13:27 -05:00
|
|
|
|
|
|
|
|
LL | y[0];
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: aborting due to 19 previous errors
|
2018-01-16 10:06:27 -06:00
|
|
|
|