]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/single_element_loop.stderr
Auto merge of #78553 - Nadrieril:fix-78549, r=varkor
[rust.git] / src / tools / clippy / tests / ui / single_element_loop.stderr
1 error: for loop over a single element
2   --> $DIR/single_element_loop.rs:7:5
3    |
4 LL | /     for item in &[item1] {
5 LL | |         println!("{}", item);
6 LL | |     }
7    | |_____^
8    |
9    = note: `-D clippy::single-element-loop` implied by `-D warnings`
10 help: try
11    |
12 LL |     {
13 LL |         let item = &item1;
14 LL |         println!("{}", item);
15 LL |     }
16    |
17
18 error: aborting due to previous error
19