]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/single_element_loop.stderr
New upstream version 1.56.0~beta.4+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / single_element_loop.stderr
CommitLineData
f20569fa
XL
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 |
94222f64
XL
12LL ~ {
13LL + let item = &item1;
14LL + println!("{}", item);
15LL + }
f20569fa
XL
16 |
17
cdc7bbd5
XL
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 |
94222f64
XL
28LL ~ {
29LL + let item = &item1;
30LL + println!("{:?}", item);
31LL + }
cdc7bbd5
XL
32 |
33
34error: aborting due to 2 previous errors
f20569fa 35