mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-24 13:43:17 +00:00
29 lines
837 B
Text
29 lines
837 B
Text
error: indexing into a string may panic if the index is within a UTF-8 character
|
|
--> tests/ui/string_slice.rs:7:6
|
|
|
|
|
LL | &"Ölkanne"[1..];
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
= note: `-D clippy::string-slice` implied by `-D warnings`
|
|
= help: to override `-D warnings` add `#[allow(clippy::string_slice)]`
|
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
|
--> tests/ui/string_slice.rs:11:6
|
|
|
|
|
LL | &m[2..5];
|
|
| ^^^^^^^
|
|
|
|
error: indexing into a string may panic if the index is within a UTF-8 character
|
|
--> tests/ui/string_slice.rs:14:6
|
|
|
|
|
LL | &s[0..2];
|
|
| ^^^^^^^
|
|
|
|
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
|
|
|