11error: 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
33 |
44LL | let _ = prim[..idx];
55 | ^^^
66 |
77 = note: a character can take up more than one byte, so they are not interchangeable
88note: 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
1010 |
1111LL | for (idx, _) in prim.chars().enumerate() {
1212 | ^^^ ^^^^^^^^^^^
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 )]`
1515help: consider using `.char_indices()` instead
1616 |
1717LL | for (idx, _) in prim.char_indices() {
1818 | ~~~~~~~~~~~~~~
1919
2020error: 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
2222 |
2323LL | prim.split_at(idx);
2424 | ^^^
2525 |
2626 = note: a character can take up more than one byte, so they are not interchangeable
2727note: 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
2929 |
3030LL | for (idx, _) in prim.chars().enumerate() {
3131 | ^^^ ^^^^^^^^^^^
@@ -35,14 +35,14 @@ LL | for (idx, _) in prim.char_indices() {
3535 | ~~~~~~~~~~~~~~
3636
3737error: 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
3939 |
4040LL | let _ = prim[..prim.floor_char_boundary(idx)];
4141 | ^^^
4242 |
4343 = note: a character can take up more than one byte, so they are not interchangeable
4444note: 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
4646 |
4747LL | for (idx, _) in prim.chars().enumerate() {
4848 | ^^^ ^^^^^^^^^^^
@@ -52,14 +52,14 @@ LL | for (idx, _) in prim.char_indices() {
5252 | ~~~~~~~~~~~~~~
5353
5454error: 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
5656 |
5757LL | let _ = prim[..c.0];
5858 | ^^^
5959 |
6060 = note: a character can take up more than one byte, so they are not interchangeable
6161note: 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
6363 |
6464LL | for c in prim.chars().enumerate() {
6565 | ^ ^^^^^^^^^^^
@@ -69,14 +69,14 @@ LL | for c in prim.char_indices() {
6969 | ~~~~~~~~~~~~~~
7070
7171error: 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
7373 |
7474LL | prim.split_at(c.0);
7575 | ^^^
7676 |
7777 = note: a character can take up more than one byte, so they are not interchangeable
7878note: 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
8080 |
8181LL | for c in prim.chars().enumerate() {
8282 | ^ ^^^^^^^^^^^
@@ -86,14 +86,14 @@ LL | for c in prim.char_indices() {
8686 | ~~~~~~~~~~~~~~
8787
8888error: 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
9090 |
9191LL | let _ = string[..idx];
9292 | ^^^
9393 |
9494 = note: a character can take up more than one byte, so they are not interchangeable
9595note: 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
9797 |
9898LL | for (idx, _) in string.chars().enumerate() {
9999 | ^^^ ^^^^^^^^^^^
@@ -103,14 +103,14 @@ LL | for (idx, _) in string.char_indices() {
103103 | ~~~~~~~~~~~~~~
104104
105105error: 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
107107 |
108108LL | string.split_at(idx);
109109 | ^^^
110110 |
111111 = note: a character can take up more than one byte, so they are not interchangeable
112112note: 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
114114 |
115115LL | for (idx, _) in string.chars().enumerate() {
116116 | ^^^ ^^^^^^^^^^^
0 commit comments