]> git.lizzy.rs Git - rust.git/blob - tests/ui/bytecount.stderr
Merge branch 'master' into rustfmt_tests
[rust.git] / tests / ui / bytecount.stderr
1 error: You appear to be counting bytes the naive way
2   --> $DIR/bytecount.rs:14:13
3    |
4 14 |     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: lint level defined here
8   --> $DIR/bytecount.rs:10:8
9    |
10 10 | #[deny(clippy::naive_bytecount)]
11    |        ^^^^^^^^^^^^^^^^^^^^^^^
12
13 error: You appear to be counting bytes the naive way
14   --> $DIR/bytecount.rs:16:13
15    |
16 16 |     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:28:13
21    |
22 28 |     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