fork/rust

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

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

master
1.0 KiB26 linesraw
1error: you appear to be counting bytes the naive way
2  --> $DIR/bytecount.rs:10:13
3   |
4LL |     let _ = x.iter().filter(|&&a| a == 0).count();
5   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using the bytecount crate: `bytecount::count(x, 0)`
6   |
7note: the lint level is defined here
8  --> $DIR/bytecount.rs:5:8
9   |
10LL | #[deny(clippy::naive_bytecount)]
11   |        ^^^^^^^^^^^^^^^^^^^^^^^
12
13error: you appear to be counting bytes the naive way
14  --> $DIR/bytecount.rs:14:13
15   |
16LL |     let _ = (&x[..]).iter().filter(|&a| *a == 0).count();
17   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using the bytecount crate: `bytecount::count((&x[..]), 0)`
18
19error: you appear to be counting bytes the naive way
20  --> $DIR/bytecount.rs:32:13
21   |
22LL |     let _ = x.iter().filter(|a| b + 1 == **a).count();
23   |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using the bytecount crate: `bytecount::count(x, b + 1)`
24
25error: aborting due to 3 previous errors
26