2021-11-04 12:52:36 +00:00
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
2024-08-18 12:50:29 +00:00
|
|
|
--> tests/ui/string_slice.rs:7:6
|
2021-11-04 12:52:36 +00:00
|
|
|
|
|
|
|
|
LL | &"Ölkanne"[1..];
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: `-D clippy::string-slice` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::string_slice)]`
|
2021-11-04 12:52:36 +00:00
|
|
|
|
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
2024-08-18 12:50:29 +00:00
|
|
|
--> tests/ui/string_slice.rs:11:6
|
2021-11-04 12:52:36 +00:00
|
|
|
|
|
|
|
|
LL | &m[2..5];
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
2024-08-18 12:50:29 +00:00
|
|
|
--> tests/ui/string_slice.rs:14:6
|
2021-11-04 12:52:36 +00:00
|
|
|
|
|
|
|
|
LL | &s[0..2];
|
|
|
|
| ^^^^^^^
|
|
|
|
|
2024-08-18 12:50:29 +00:00
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
|
|
|
--> tests/ui/string_slice.rs:17:6
|
|
|
|
|
|
|
|
|
LL | &a[0..3];
|
|
|
|
| ^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
2021-11-04 12:52:36 +00:00
|
|
|
|