1 error: for loop over a single element
2 --> $DIR/single_element_loop.rs:7:5
4 LL | / for item in &[item1] {
5 LL | | println!("{}", item);
9 = note: `-D clippy::single-element-loop` implied by `-D warnings`
13 LL | let item = &item1;
14 LL | println!("{}", item);
18 error: for loop over a single element
19 --> $DIR/single_element_loop.rs:11:5
21 LL | / for item in [item1].iter() {
22 LL | | println!("{:?}", item);
29 LL | let item = &item1;
30 LL | println!("{:?}", item);
34 error: aborting due to 2 previous errors