fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
775 B23 linesraw
1error: called `.bytes().nth()` on a `String`
2  --> $DIR/bytes_nth.rs:6:13
3   |
4LL |     let _ = s.bytes().nth(3);
5   |             ^^^^^^^^^^^^^^^^ help: try: `s.as_bytes().get(3).copied()`
6   |
7   = note: `-D clippy::bytes-nth` implied by `-D warnings`
8   = help: to override `-D warnings` add `#[allow(clippy::bytes_nth)]`
9
10error: called `.bytes().nth().unwrap()` on a `String`
11  --> $DIR/bytes_nth.rs:7:14
12   |
13LL |     let _ = &s.bytes().nth(3).unwrap();
14   |              ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `s.as_bytes()[3]`
15
16error: called `.bytes().nth()` on a `str`
17  --> $DIR/bytes_nth.rs:8:13
18   |
19LL |     let _ = s[..].bytes().nth(3);
20   |             ^^^^^^^^^^^^^^^^^^^^ help: try: `s[..].as_bytes().get(3).copied()`
21
22error: aborting due to 3 previous errors
23