blob: 90be1dc328371f6bc611cc236bd14b31f600d6e1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
error: for loop over a single element
--> $DIR/single_element_loop.rs:7:5
|
LL | / for item in &[item1] {
LL | | println!("{}", item);
LL | | }
| |_____^
|
= note: `-D clippy::single-element-loop` implied by `-D warnings`
help: try
|
LL | {
LL | let item = &item1;
LL | println!("{}", item);
LL | }
|
error: aborting due to previous error
|