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