about summary refs log tree commit diff
path: root/src/tools/clippy/tests/ui/string_slice.stderr
blob: f99413c6dfc6f9e521d2e61791607ceba3e79602 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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:15: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:19:6
   |
LL |     &a[0..3];
   |      ^^^^^^^

error: aborting due to 4 previous errors