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