mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-23 21:23:56 +00:00
22 lines
589 B
Text
22 lines
589 B
Text
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`
|
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
|
--> $DIR/string_slice.rs:7:6
|
|
|
|
|
LL | &m[2..5];
|
|
| ^^^^^^^
|
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
|
--> $DIR/string_slice.rs:9:6
|
|
|
|
|
LL | &s[0..2];
|
|
| ^^^^^^^
|
|
|
|
error: aborting due to 3 previous errors
|
|
|