]>
Commit | Line | Data |
---|---|---|
ea8adc8c XL |
1 | error: You appear to be counting bytes the naive way |
2 | --> $DIR/bytecount.rs:8:13 | |
3 | | | |
4 | 8 | 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:4:8 | |
9 | | | |
10 | 4 | #[deny(naive_bytecount)] | |
11 | | ^^^^^^^^^^^^^^^ | |
12 | ||
13 | error: You appear to be counting bytes the naive way | |
14 | --> $DIR/bytecount.rs:10:13 | |
15 | | | |
16 | 10 | 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:22:13 | |
21 | | | |
22 | 22 | 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 |