]> git.lizzy.rs Git - rust.git/blob - tests/ui/iter_on_empty_collections.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / iter_on_empty_collections.stderr
1 error: `into_iter` call on an empty collection
2   --> $DIR/iter_on_empty_collections.rs:6:16
3    |
4 LL |     assert_eq!([].into_iter().next(), Option::<i32>::None);
5    |                ^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
6    |
7    = note: `-D clippy::iter-on-empty-collections` implied by `-D warnings`
8
9 error: `iter_mut` call on an empty collection
10   --> $DIR/iter_on_empty_collections.rs:7:16
11    |
12 LL |     assert_eq!([].iter_mut().next(), Option::<&mut i32>::None);
13    |                ^^^^^^^^^^^^^ help: try: `std::iter::empty()`
14
15 error: `iter` call on an empty collection
16   --> $DIR/iter_on_empty_collections.rs:8:16
17    |
18 LL |     assert_eq!([].iter().next(), Option::<&i32>::None);
19    |                ^^^^^^^^^ help: try: `std::iter::empty()`
20
21 error: `into_iter` call on an empty collection
22   --> $DIR/iter_on_empty_collections.rs:9:16
23    |
24 LL |     assert_eq!(None.into_iter().next(), Option::<i32>::None);
25    |                ^^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
26
27 error: `iter_mut` call on an empty collection
28   --> $DIR/iter_on_empty_collections.rs:10:16
29    |
30 LL |     assert_eq!(None.iter_mut().next(), Option::<&mut i32>::None);
31    |                ^^^^^^^^^^^^^^^ help: try: `std::iter::empty()`
32
33 error: `iter` call on an empty collection
34   --> $DIR/iter_on_empty_collections.rs:11:16
35    |
36 LL |     assert_eq!(None.iter().next(), Option::<&i32>::None);
37    |                ^^^^^^^^^^^ help: try: `std::iter::empty()`
38
39 error: aborting due to 6 previous errors
40