summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/iter_on_empty_collections.stderr
blob: cbd611769569670ab06ce18c3fbde8bba2308ddb (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
error: `into_iter` call on an empty collection
  --> $DIR/iter_on_empty_collections.rs:6:16
   |
LL |     assert_eq!([].into_iter().next(), Option::<i32>::None);
   |                ^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
   |
   = note: `-D clippy::iter-on-empty-collections` implied by `-D warnings`

error: `iter_mut` call on an empty collection
  --> $DIR/iter_on_empty_collections.rs:7:16
   |
LL |     assert_eq!([].iter_mut().next(), Option::<&mut i32>::None);
   |                ^^^^^^^^^^^^^ help: try: `std::iter::empty()`

error: `iter` call on an empty collection
  --> $DIR/iter_on_empty_collections.rs:8:16
   |
LL |     assert_eq!([].iter().next(), Option::<&i32>::None);
   |                ^^^^^^^^^ help: try: `std::iter::empty()`

error: `into_iter` call on an empty collection
  --> $DIR/iter_on_empty_collections.rs:9:16
   |
LL |     assert_eq!(None.into_iter().next(), Option::<i32>::None);
   |                ^^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`

error: `iter_mut` call on an empty collection
  --> $DIR/iter_on_empty_collections.rs:10:16
   |
LL |     assert_eq!(None.iter_mut().next(), Option::<&mut i32>::None);
   |                ^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`

error: `iter` call on an empty collection
  --> $DIR/iter_on_empty_collections.rs:11:16
   |
LL |     assert_eq!(None.iter().next(), Option::<&i32>::None);
   |                ^^^^^^^^^^^ help: try: `std::iter::empty()`

error: aborting due to 6 previous errors