2023-04-11 08:31:08 -05:00
|
|
|
error: `drain` used to clear a `Vec`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:22:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | v.drain(0..v.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::clear-with-drain` implied by `-D warnings`
|
2023-08-01 07:02:21 -05:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::clear_with_drain)]`
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
error: `drain` used to clear a `Vec`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:26:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | v.drain(usize::MIN..v.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `Vec`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:45:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | v.drain(0..);
|
|
|
|
| ^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `Vec`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:49:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | v.drain(usize::MIN..);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `Vec`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:65:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | v.drain(..);
|
|
|
|
| ^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `Vec`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:82:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | v.drain(..v.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `VecDeque`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:120:11
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | deque.drain(0..deque.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `VecDeque`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:124:11
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | deque.drain(usize::MIN..deque.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `VecDeque`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:143:11
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | deque.drain(0..);
|
|
|
|
| ^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `VecDeque`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:147:11
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | deque.drain(usize::MIN..);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `VecDeque`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:163:11
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | deque.drain(..);
|
|
|
|
| ^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `VecDeque`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:180:11
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | deque.drain(..deque.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `String`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:218:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | s.drain(0..s.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `String`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:222:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | s.drain(usize::MIN..s.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `String`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:241:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | s.drain(0..);
|
|
|
|
| ^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `String`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:245:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | s.drain(usize::MIN..);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `String`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:261:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | s.drain(..);
|
|
|
|
| ^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `String`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:278:7
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | s.drain(..s.len());
|
|
|
|
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `HashSet`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:316:9
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | set.drain();
|
|
|
|
| ^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `HashMap`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:335:9
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | map.drain();
|
|
|
|
| ^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: `drain` used to clear a `BinaryHeap`
|
2024-02-27 08:25:18 -06:00
|
|
|
--> tests/ui/clear_with_drain.rs:354:10
|
2023-04-11 08:31:08 -05:00
|
|
|
|
|
|
|
|
LL | heap.drain();
|
|
|
|
| ^^^^^^^ help: try: `clear()`
|
|
|
|
|
|
|
|
error: aborting due to 21 previous errors
|
|
|
|
|