1
1
error: indexing into a string with a character position where a byte index is expected
2
- --> tests/ui/char_indices_as_byte_indices.rs:13 :24
2
+ --> tests/ui/char_indices_as_byte_indices.rs:12 :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/char_indices_as_byte_indices.rs:12 :10
9
+ --> tests/ui/char_indices_as_byte_indices.rs:11 :10
10
10
|
11
11
LL | for (idx, _) in prim.chars().enumerate() {
12
12
| ^^^ ^^^^^^^^^^^
@@ -19,14 +19,14 @@ LL + for (idx, _) in prim.char_indices() {
19
19
|
20
20
21
21
error: passing a character position to a method that expects a byte index
22
- --> tests/ui/char_indices_as_byte_indices.rs:15 :23
22
+ --> tests/ui/char_indices_as_byte_indices.rs:14 :23
23
23
|
24
24
LL | prim.split_at(idx);
25
25
| ^^^
26
26
|
27
27
= note: a character can take up more than one byte, so they are not interchangeable
28
28
note: position comes from the enumerate iterator
29
- --> tests/ui/char_indices_as_byte_indices.rs:12 :10
29
+ --> tests/ui/char_indices_as_byte_indices.rs:11 :10
30
30
|
31
31
LL | for (idx, _) in prim.chars().enumerate() {
32
32
| ^^^ ^^^^^^^^^^^
@@ -37,14 +37,14 @@ LL + for (idx, _) in prim.char_indices() {
37
37
|
38
38
39
39
error: passing a character position to a method that expects a byte index
40
- --> tests/ui/char_indices_as_byte_indices.rs:19 :49
40
+ --> tests/ui/char_indices_as_byte_indices.rs:18 :49
41
41
|
42
42
LL | let _ = prim[..prim.floor_char_boundary(idx)];
43
43
| ^^^
44
44
|
45
45
= note: a character can take up more than one byte, so they are not interchangeable
46
46
note: position comes from the enumerate iterator
47
- --> tests/ui/char_indices_as_byte_indices.rs:12 :10
47
+ --> tests/ui/char_indices_as_byte_indices.rs:11 :10
48
48
|
49
49
LL | for (idx, _) in prim.chars().enumerate() {
50
50
| ^^^ ^^^^^^^^^^^
@@ -55,14 +55,14 @@ LL + for (idx, _) in prim.char_indices() {
55
55
|
56
56
57
57
error: indexing into a string with a character position where a byte index is expected
58
- --> tests/ui/char_indices_as_byte_indices.rs:29 :24
58
+ --> tests/ui/char_indices_as_byte_indices.rs:28 :24
59
59
|
60
60
LL | let _ = prim[..c.0];
61
61
| ^^^
62
62
|
63
63
= note: a character can take up more than one byte, so they are not interchangeable
64
64
note: position comes from the enumerate iterator
65
- --> tests/ui/char_indices_as_byte_indices.rs:28 :9
65
+ --> tests/ui/char_indices_as_byte_indices.rs:27 :9
66
66
|
67
67
LL | for c in prim.chars().enumerate() {
68
68
| ^ ^^^^^^^^^^^
@@ -73,14 +73,14 @@ LL + for c in prim.char_indices() {
73
73
|
74
74
75
75
error: passing a character position to a method that expects a byte index
76
- --> tests/ui/char_indices_as_byte_indices.rs:31 :23
76
+ --> tests/ui/char_indices_as_byte_indices.rs:30 :23
77
77
|
78
78
LL | prim.split_at(c.0);
79
79
| ^^^
80
80
|
81
81
= note: a character can take up more than one byte, so they are not interchangeable
82
82
note: position comes from the enumerate iterator
83
- --> tests/ui/char_indices_as_byte_indices.rs:28 :9
83
+ --> tests/ui/char_indices_as_byte_indices.rs:27 :9
84
84
|
85
85
LL | for c in prim.chars().enumerate() {
86
86
| ^ ^^^^^^^^^^^
@@ -91,14 +91,14 @@ LL + for c in prim.char_indices() {
91
91
|
92
92
93
93
error: indexing into a string with a character position where a byte index is expected
94
- --> tests/ui/char_indices_as_byte_indices.rs:36 :26
94
+ --> tests/ui/char_indices_as_byte_indices.rs:35 :26
95
95
|
96
96
LL | let _ = string[..idx];
97
97
| ^^^
98
98
|
99
99
= note: a character can take up more than one byte, so they are not interchangeable
100
100
note: position comes from the enumerate iterator
101
- --> tests/ui/char_indices_as_byte_indices.rs:35 :10
101
+ --> tests/ui/char_indices_as_byte_indices.rs:34 :10
102
102
|
103
103
LL | for (idx, _) in string.chars().enumerate() {
104
104
| ^^^ ^^^^^^^^^^^
@@ -109,14 +109,14 @@ LL + for (idx, _) in string.char_indices() {
109
109
|
110
110
111
111
error: passing a character position to a method that expects a byte index
112
- --> tests/ui/char_indices_as_byte_indices.rs:38 :25
112
+ --> tests/ui/char_indices_as_byte_indices.rs:37 :25
113
113
|
114
114
LL | string.split_at(idx);
115
115
| ^^^
116
116
|
117
117
= note: a character can take up more than one byte, so they are not interchangeable
118
118
note: position comes from the enumerate iterator
119
- --> tests/ui/char_indices_as_byte_indices.rs:35 :10
119
+ --> tests/ui/char_indices_as_byte_indices.rs:34 :10
120
120
|
121
121
LL | for (idx, _) in string.chars().enumerate() {
122
122
| ^^^ ^^^^^^^^^^^
0 commit comments