blob: 54788f2fa2f4cfc00f02b3bfeb1873c63a1b3555 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:14:9
|
LL | let peekable = std::iter::empty::<u32>().peekable();
| ^^^^^^^^
|
= help: consider removing the call to `peekable`
= note: `-D clippy::unused-peekable` implied by `-D warnings`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:18:9
|
LL | let new_local = old_local;
| ^^^^^^^^^
|
= help: consider removing the call to `peekable`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:22:9
|
LL | let by_mut_ref = &mut by_mut_ref_test;
| ^^^^^^^^^^
|
= help: consider removing the call to `peekable`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:29:9
|
LL | let peekable_from_fn = returns_peekable();
| ^^^^^^^^^^^^^^^^
|
= help: consider removing the call to `peekable`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:32:13
|
LL | let mut peekable_using_iterator_method = std::iter::empty::<u32>().peekable();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: consider removing the call to `peekable`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:37:9
|
LL | let passed_along_ref = std::iter::empty::<u32>().peekable();
| ^^^^^^^^^^^^^^^^
|
= help: consider removing the call to `peekable`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:42:9
|
LL | let _by_ref = by_ref_test.by_ref();
| ^^^^^^^
|
= help: consider removing the call to `peekable`
error: `peek` never called on `Peekable` iterator
--> $DIR/unused_peekable.rs:44:13
|
LL | let mut peekable_in_for_loop = std::iter::empty::<u32>().peekable();
| ^^^^^^^^^^^^^^^^^^^^
|
= help: consider removing the call to `peekable`
error: aborting due to 8 previous errors
|