1error: for loop over a single element
2  --> $DIR/single_element_loop.rs:7:5
3   |
4LL | /     for item in &[item1] {
5LL | |         println!("{}", item);
6LL | |     }
7   | |_____^
8   |
9   = note: `-D clippy::single-element-loop` implied by `-D warnings`
10help: try
11   |
12LL ~     {
13LL +         let item = &item1;
14LL +         println!("{}", item);
15LL +     }
16   |
17
18error: for loop over a single element
19  --> $DIR/single_element_loop.rs:11:5
20   |
21LL | /     for item in [item1].iter() {
22LL | |         println!("{:?}", item);
23LL | |     }
24   | |_____^
25   |
26help: try
27   |
28LL ~     {
29LL +         let item = &item1;
30LL +         println!("{:?}", item);
31LL +     }
32   |
33
34error: aborting due to 2 previous errors
35
36