rust-clippy/tests/ui/string_slice.stderr

24 lines
676 B
Text
Raw Normal View History

error: indexing into a string may panic if the index is within a UTF-8 character
--> tests/ui/string_slice.rs:5: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:9: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:12:6
|
LL | &s[0..2];
| ^^^^^^^
error: aborting due to 3 previous errors