2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:115:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &x[index..];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(n..)` or .get_mut(n..)` instead
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::indexing-slicing` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::indexing_slicing)]`
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:117:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &x[..index];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:119:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &x[index_from..index_to];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:121:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | &x[index_from..][..index_to];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:121:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | &x[index_from..][..index_to];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:124:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | &x[5..][..10];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:124:8
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | &x[5..][..10];
|
2018-10-15 11:44:39 +00:00
|
|
|
| ^
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
2019-07-16 05:30:23 +00:00
|
|
|
= note: `-D clippy::out-of-bounds-indexing` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::out_of_bounds_indexing)]`
|
2018-06-14 20:04:37 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:128:6
|
2018-06-14 20:04:37 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &x[0..][..3];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-06-14 20:04:37 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:130:6
|
2018-06-14 20:04:37 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &x[1..][..5];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^
|
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-06-14 20:04:37 +00:00
|
|
|
|
2020-09-24 12:49:22 +00:00
|
|
|
error: range is out of bounds
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:138:12
|
2017-05-17 12:19:44 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &y[0..=4];
|
2020-09-24 12:49:22 +00:00
|
|
|
| ^
|
2018-06-14 20:04:37 +00:00
|
|
|
|
2020-09-24 12:49:22 +00:00
|
|
|
error: range is out of bounds
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:140:11
|
2018-06-14 20:04:37 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &y[..=4];
|
2020-09-24 12:49:22 +00:00
|
|
|
| ^
|
2017-05-17 12:19:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:146:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &v[10..100];
|
2017-05-17 12:19:44 +00:00
|
|
|
| ^^^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(n..m)` or `.get_mut(n..m)` instead
|
2017-05-17 12:19:44 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:148:6
|
2018-06-14 20:04:37 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | &x[10..][..100];
|
2018-06-14 20:04:37 +00:00
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-06-14 20:04:37 +00:00
|
|
|
|
|
|
|
error: range is out of bounds
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:148:8
|
2018-06-14 20:04:37 +00:00
|
|
|
|
|
2023-08-24 19:32:12 +00:00
|
|
|
LL | &x[10..][..100];
|
2018-10-15 11:44:39 +00:00
|
|
|
| ^^
|
2018-06-14 20:04:37 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:151:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &v[10..];
|
2018-05-23 04:56:02 +00:00
|
|
|
| ^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(n..)` or .get_mut(n..)` instead
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
error: slicing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:153:6
|
2018-05-23 04:56:02 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | &v[..100];
|
2018-05-23 04:56:02 +00:00
|
|
|
| ^^^^^^^^
|
2018-06-13 23:28:57 +00:00
|
|
|
|
|
2021-03-12 14:30:50 +00:00
|
|
|
= help: consider using `.get(..n)`or `.get_mut(..n)` instead
|
2018-05-23 04:56:02 +00:00
|
|
|
|
2024-03-27 10:13:27 +00:00
|
|
|
error: indexing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:171:5
|
2024-03-27 10:13:27 +00:00
|
|
|
|
|
|
|
|
LL | map_with_get[true];
|
|
|
|
| ^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: indexing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:174:5
|
2024-03-27 10:13:27 +00:00
|
|
|
|
|
|
|
|
LL | s[0];
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: indexing may panic
|
2024-06-09 09:33:00 +00:00
|
|
|
--> tests/ui/indexing_slicing_slice.rs:177:5
|
2024-03-27 10:13:27 +00:00
|
|
|
|
|
|
|
|
LL | y[0];
|
|
|
|
| ^^^^
|
|
|
|
|
|
|
|
|
= help: consider using `.get(n)` or `.get_mut(n)` instead
|
|
|
|
|
|
|
|
error: aborting due to 19 previous errors
|
2018-01-16 16:06:27 +00:00
|
|
|
|