|  | 
| 1 | 1 | error: you seem to be trying to move all elements into a new `BinaryHeap` | 
| 2 |  | -  --> $DIR/drain_collect.rs:6:5 | 
|  | 2 | +  --> $DIR/drain_collect.rs:9:5 | 
| 3 | 3 |    | | 
| 4 | 4 | LL |     b.drain().collect() | 
| 5 |  | -   |     ^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 5 | +   |     ^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 6 | 6 |    | | 
| 7 | 7 | note: the lint level is defined here | 
| 8 |  | -  --> $DIR/drain_collect.rs:1:9 | 
|  | 8 | +  --> $DIR/drain_collect.rs:3:9 | 
| 9 | 9 |    | | 
| 10 | 10 | LL | #![deny(clippy::drain_collect)] | 
| 11 | 11 |    |         ^^^^^^^^^^^^^^^^^^^^^ | 
| 12 | 12 | 
 | 
| 13 | 13 | error: you seem to be trying to move all elements into a new `HashMap` | 
| 14 |  | -  --> $DIR/drain_collect.rs:14:5 | 
|  | 14 | +  --> $DIR/drain_collect.rs:17:5 | 
| 15 | 15 |    | | 
| 16 | 16 | LL |     b.drain().collect() | 
| 17 |  | -   |     ^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 17 | +   |     ^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 18 | 18 | 
 | 
| 19 | 19 | error: you seem to be trying to move all elements into a new `HashSet` | 
| 20 |  | -  --> $DIR/drain_collect.rs:22:5 | 
|  | 20 | +  --> $DIR/drain_collect.rs:25:5 | 
| 21 | 21 |    | | 
| 22 | 22 | LL |     b.drain().collect() | 
| 23 |  | -   |     ^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 23 | +   |     ^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 24 | 24 | 
 | 
| 25 | 25 | error: you seem to be trying to move all elements into a new `Vec` | 
| 26 |  | -  --> $DIR/drain_collect.rs:30:5 | 
|  | 26 | +  --> $DIR/drain_collect.rs:33:5 | 
| 27 | 27 |    | | 
| 28 | 28 | LL |     b.drain(..).collect() | 
| 29 |  | -   |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 29 | +   |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 30 | 30 | 
 | 
| 31 | 31 | error: you seem to be trying to move all elements into a new `Vec` | 
| 32 |  | -  --> $DIR/drain_collect.rs:38:5 | 
|  | 32 | +  --> $DIR/drain_collect.rs:41:5 | 
| 33 | 33 |    | | 
| 34 | 34 | LL |     b.drain(..).collect() | 
| 35 |  | -   |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 35 | +   |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 36 | 36 | 
 | 
| 37 | 37 | error: you seem to be trying to move all elements into a new `Vec` | 
| 38 |  | -  --> $DIR/drain_collect.rs:42:5 | 
|  | 38 | +  --> $DIR/drain_collect.rs:45:5 | 
| 39 | 39 |    | | 
| 40 | 40 | LL |     b.drain(0..).collect() | 
| 41 |  | -   |     ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 41 | +   |     ^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 42 | 42 | 
 | 
| 43 | 43 | error: you seem to be trying to move all elements into a new `Vec` | 
| 44 |  | -  --> $DIR/drain_collect.rs:46:5 | 
|  | 44 | +  --> $DIR/drain_collect.rs:49:5 | 
| 45 | 45 |    | | 
| 46 | 46 | LL |     b.drain(..b.len()).collect() | 
| 47 |  | -   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 47 | +   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 48 | 48 | 
 | 
| 49 | 49 | error: you seem to be trying to move all elements into a new `Vec` | 
| 50 |  | -  --> $DIR/drain_collect.rs:50:5 | 
|  | 50 | +  --> $DIR/drain_collect.rs:53:5 | 
| 51 | 51 |    | | 
| 52 | 52 | LL |     b.drain(0..b.len()).collect() | 
| 53 |  | -   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
|  | 53 | +   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
| 54 | 54 | 
 | 
| 55 |  | -error: you seem to be trying to move all elements into a new `String` | 
|  | 55 | +error: you seem to be trying to move all elements into a new `Vec` | 
| 56 | 56 |   --> $DIR/drain_collect.rs:58:5 | 
| 57 | 57 |    | | 
| 58 | 58 | LL |     b.drain(..).collect() | 
| 59 | 59 |    |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(&mut b)` | 
| 60 | 60 | 
 | 
| 61 |  | -error: aborting due to 9 previous errors | 
|  | 61 | +error: you seem to be trying to move all elements into a new `String` | 
|  | 62 | +  --> $DIR/drain_collect.rs:66:5 | 
|  | 63 | +   | | 
|  | 64 | +LL |     b.drain(..).collect() | 
|  | 65 | +   |     ^^^^^^^^^^^^^^^^^^^^^ help: consider using `mem::take`: `std::mem::take(b)` | 
|  | 66 | + | 
|  | 67 | +error: aborting due to 10 previous errors | 
| 62 | 68 | 
 | 
0 commit comments