]> git.lizzy.rs Git - rust.git/blob - tests/ui/iter_on_single_items.stderr
[`excessive_bools`] lint trait functions even without bodies
[rust.git] / tests / ui / iter_on_single_items.stderr
1 error: `into_iter` call on a collection with only one item
2   --> $DIR/iter_on_single_items.rs:6:16
3    |
4 LL |     assert_eq!([123].into_iter().next(), Some(123));
5    |                ^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(123)`
6    |
7    = note: `-D clippy::iter-on-single-items` implied by `-D warnings`
8
9 error: `iter_mut` call on a collection with only one item
10   --> $DIR/iter_on_single_items.rs:7:16
11    |
12 LL |     assert_eq!([123].iter_mut().next(), Some(&mut 123));
13    |                ^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&mut 123)`
14
15 error: `iter` call on a collection with only one item
16   --> $DIR/iter_on_single_items.rs:8:16
17    |
18 LL |     assert_eq!([123].iter().next(), Some(&123));
19    |                ^^^^^^^^^^^^ help: try: `std::iter::once(&123)`
20
21 error: `into_iter` call on a collection with only one item
22   --> $DIR/iter_on_single_items.rs:9:16
23    |
24 LL |     assert_eq!(Some(123).into_iter().next(), Some(123));
25    |                ^^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(123)`
26
27 error: `iter_mut` call on a collection with only one item
28   --> $DIR/iter_on_single_items.rs:10:16
29    |
30 LL |     assert_eq!(Some(123).iter_mut().next(), Some(&mut 123));
31    |                ^^^^^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&mut 123)`
32
33 error: `iter` call on a collection with only one item
34   --> $DIR/iter_on_single_items.rs:11:16
35    |
36 LL |     assert_eq!(Some(123).iter().next(), Some(&123));
37    |                ^^^^^^^^^^^^^^^^ help: try: `std::iter::once(&123)`
38
39 error: aborting due to 6 previous errors
40