summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/src/docs/infinite_iter.txt
blob: 8a22fabc5492c4f87689a75dbe149dafba04951a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
### What it does
Checks for iteration that is guaranteed to be infinite.

### Why is this bad?
While there may be places where this is acceptable
(e.g., in event streams), in most cases this is simply an error.

### Example
```
use std::iter;

iter::repeat(1_u8).collect::<Vec<_>>();
```