]> git.lizzy.rs Git - rust.git/blob - src/tools/clippy/tests/ui/iter_with_drain.stderr
Auto merge of #97944 - nikic:freebsd-update, r=Mark-Simulacrum
[rust.git] / src / tools / clippy / tests / ui / iter_with_drain.stderr
1 error: `drain(..)` used on a `Vec`
2   --> $DIR/iter_with_drain.rs:11:34
3    |
4 LL |     let mut a: BinaryHeap<_> = a.drain(..).collect();
5    |                                  ^^^^^^^^^ help: try this: `into_iter()`
6    |
7    = note: `-D clippy::iter-with-drain` implied by `-D warnings`
8
9 error: `drain(..)` used on a `VecDeque`
10   --> $DIR/iter_with_drain.rs:14:27
11    |
12 LL |     let mut a: Vec<_> = a.drain(..).collect();
13    |                           ^^^^^^^^^ help: try this: `into_iter()`
14
15 error: `drain(..)` used on a `Vec`
16   --> $DIR/iter_with_drain.rs:15:34
17    |
18 LL |     let mut a: HashMap<_, _> = a.drain(..).map(|x| (x.clone(), x)).collect();
19    |                                  ^^^^^^^^^ help: try this: `into_iter()`
20
21 error: `drain(..)` used on a `Vec`
22   --> $DIR/iter_with_drain.rs:21:34
23    |
24 LL |     let mut a: BinaryHeap<_> = a.drain(0..).collect();
25    |                                  ^^^^^^^^^^ help: try this: `into_iter()`
26
27 error: `drain(..)` used on a `VecDeque`
28   --> $DIR/iter_with_drain.rs:24:27
29    |
30 LL |     let mut a: Vec<_> = a.drain(..a.len()).collect();
31    |                           ^^^^^^^^^^^^^^^^ help: try this: `into_iter()`
32
33 error: `drain(..)` used on a `Vec`
34   --> $DIR/iter_with_drain.rs:25:34
35    |
36 LL |     let mut a: HashMap<_, _> = a.drain(0..a.len()).map(|x| (x.clone(), x)).collect();
37    |                                  ^^^^^^^^^^^^^^^^^ help: try this: `into_iter()`
38
39 error: aborting due to 6 previous errors
40