1
1
error: indexing into a string with a character position where a byte index is expected
2
- --> tests/ui/chars_enumerate_for_byte_indices .rs:13:24
2
+ --> tests/ui/char_indices_as_byte_indices .rs:13:24
3
3
|
4
4
LL | let _ = prim[..idx];
5
5
| ^^^
6
6
|
7
7
= note: a character can take up more than one byte, so they are not interchangeable
8
8
note: position comes from the enumerate iterator
9
- --> tests/ui/chars_enumerate_for_byte_indices .rs:12:10
9
+ --> tests/ui/char_indices_as_byte_indices .rs:12:10
10
10
|
11
11
LL | for (idx, _) in prim.chars().enumerate() {
12
12
| ^^^ ^^^^^^^^^^^
13
- = note: `-D clippy::chars-enumerate-for -byte-indices` implied by `-D warnings`
14
- = help: to override `-D warnings` add `#[allow(clippy::chars_enumerate_for_byte_indices )]`
13
+ = note: `-D clippy::char-indices-as -byte-indices` implied by `-D warnings`
14
+ = help: to override `-D warnings` add `#[allow(clippy::char_indices_as_byte_indices )]`
15
15
help: consider using `.char_indices()` instead
16
16
|
17
17
LL | for (idx, _) in prim.char_indices() {
18
18
| ~~~~~~~~~~~~~~
19
19
20
20
error: passing a character position to a method that expects a byte index
21
- --> tests/ui/chars_enumerate_for_byte_indices .rs:15:23
21
+ --> tests/ui/char_indices_as_byte_indices .rs:15:23
22
22
|
23
23
LL | prim.split_at(idx);
24
24
| ^^^
25
25
|
26
26
= note: a character can take up more than one byte, so they are not interchangeable
27
27
note: position comes from the enumerate iterator
28
- --> tests/ui/chars_enumerate_for_byte_indices .rs:12:10
28
+ --> tests/ui/char_indices_as_byte_indices .rs:12:10
29
29
|
30
30
LL | for (idx, _) in prim.chars().enumerate() {
31
31
| ^^^ ^^^^^^^^^^^
@@ -35,14 +35,14 @@ LL | for (idx, _) in prim.char_indices() {
35
35
| ~~~~~~~~~~~~~~
36
36
37
37
error: passing a character position to a method that expects a byte index
38
- --> tests/ui/chars_enumerate_for_byte_indices .rs:19:49
38
+ --> tests/ui/char_indices_as_byte_indices .rs:19:49
39
39
|
40
40
LL | let _ = prim[..prim.floor_char_boundary(idx)];
41
41
| ^^^
42
42
|
43
43
= note: a character can take up more than one byte, so they are not interchangeable
44
44
note: position comes from the enumerate iterator
45
- --> tests/ui/chars_enumerate_for_byte_indices .rs:12:10
45
+ --> tests/ui/char_indices_as_byte_indices .rs:12:10
46
46
|
47
47
LL | for (idx, _) in prim.chars().enumerate() {
48
48
| ^^^ ^^^^^^^^^^^
@@ -52,14 +52,14 @@ LL | for (idx, _) in prim.char_indices() {
52
52
| ~~~~~~~~~~~~~~
53
53
54
54
error: indexing into a string with a character position where a byte index is expected
55
- --> tests/ui/chars_enumerate_for_byte_indices .rs:29:24
55
+ --> tests/ui/char_indices_as_byte_indices .rs:29:24
56
56
|
57
57
LL | let _ = prim[..c.0];
58
58
| ^^^
59
59
|
60
60
= note: a character can take up more than one byte, so they are not interchangeable
61
61
note: position comes from the enumerate iterator
62
- --> tests/ui/chars_enumerate_for_byte_indices .rs:28:9
62
+ --> tests/ui/char_indices_as_byte_indices .rs:28:9
63
63
|
64
64
LL | for c in prim.chars().enumerate() {
65
65
| ^ ^^^^^^^^^^^
@@ -69,14 +69,14 @@ LL | for c in prim.char_indices() {
69
69
| ~~~~~~~~~~~~~~
70
70
71
71
error: passing a character position to a method that expects a byte index
72
- --> tests/ui/chars_enumerate_for_byte_indices .rs:31:23
72
+ --> tests/ui/char_indices_as_byte_indices .rs:31:23
73
73
|
74
74
LL | prim.split_at(c.0);
75
75
| ^^^
76
76
|
77
77
= note: a character can take up more than one byte, so they are not interchangeable
78
78
note: position comes from the enumerate iterator
79
- --> tests/ui/chars_enumerate_for_byte_indices .rs:28:9
79
+ --> tests/ui/char_indices_as_byte_indices .rs:28:9
80
80
|
81
81
LL | for c in prim.chars().enumerate() {
82
82
| ^ ^^^^^^^^^^^
@@ -86,14 +86,14 @@ LL | for c in prim.char_indices() {
86
86
| ~~~~~~~~~~~~~~
87
87
88
88
error: indexing into a string with a character position where a byte index is expected
89
- --> tests/ui/chars_enumerate_for_byte_indices .rs:36:26
89
+ --> tests/ui/char_indices_as_byte_indices .rs:36:26
90
90
|
91
91
LL | let _ = string[..idx];
92
92
| ^^^
93
93
|
94
94
= note: a character can take up more than one byte, so they are not interchangeable
95
95
note: position comes from the enumerate iterator
96
- --> tests/ui/chars_enumerate_for_byte_indices .rs:35:10
96
+ --> tests/ui/char_indices_as_byte_indices .rs:35:10
97
97
|
98
98
LL | for (idx, _) in string.chars().enumerate() {
99
99
| ^^^ ^^^^^^^^^^^
@@ -103,14 +103,14 @@ LL | for (idx, _) in string.char_indices() {
103
103
| ~~~~~~~~~~~~~~
104
104
105
105
error: passing a character position to a method that expects a byte index
106
- --> tests/ui/chars_enumerate_for_byte_indices .rs:38:25
106
+ --> tests/ui/char_indices_as_byte_indices .rs:38:25
107
107
|
108
108
LL | string.split_at(idx);
109
109
| ^^^
110
110
|
111
111
= note: a character can take up more than one byte, so they are not interchangeable
112
112
note: position comes from the enumerate iterator
113
- --> tests/ui/chars_enumerate_for_byte_indices .rs:35:10
113
+ --> tests/ui/char_indices_as_byte_indices .rs:35:10
114
114
|
115
115
LL | for (idx, _) in string.chars().enumerate() {
116
116
| ^^^ ^^^^^^^^^^^
0 commit comments