blob: 8b09c26e46af2ff49d204a4ac9f4883bf3d3dacc [file]
error: `drain` used to clear a `Vec`
--> tests/ui/clear_with_drain.rs:21:7
|
LL | v.drain(0..v.len());
| ^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
= note: `-D clippy::clear-with-drain` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(clippy::clear_with_drain)]`
error: `drain` used to clear a `Vec`
--> tests/ui/clear_with_drain.rs:26:7
|
LL | v.drain(usize::MIN..v.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> tests/ui/clear_with_drain.rs:46:7
|
LL | v.drain(0..);
| ^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> tests/ui/clear_with_drain.rs:51:7
|
LL | v.drain(usize::MIN..);
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> tests/ui/clear_with_drain.rs:68:7
|
LL | v.drain(..);
| ^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> tests/ui/clear_with_drain.rs:86:7
|
LL | v.drain(..v.len());
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `VecDeque`
--> tests/ui/clear_with_drain.rs:125:11
|
LL | deque.drain(0..deque.len());
| ^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `VecDeque`
--> tests/ui/clear_with_drain.rs:130:11
|
LL | deque.drain(usize::MIN..deque.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `VecDeque`
--> tests/ui/clear_with_drain.rs:150:11
|
LL | deque.drain(0..);
| ^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `VecDeque`
--> tests/ui/clear_with_drain.rs:155:11
|
LL | deque.drain(usize::MIN..);
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `VecDeque`
--> tests/ui/clear_with_drain.rs:172:11
|
LL | deque.drain(..);
| ^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `VecDeque`
--> tests/ui/clear_with_drain.rs:190:11
|
LL | deque.drain(..deque.len());
| ^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `String`
--> tests/ui/clear_with_drain.rs:229:7
|
LL | s.drain(0..s.len());
| ^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `String`
--> tests/ui/clear_with_drain.rs:234:7
|
LL | s.drain(usize::MIN..s.len());
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `String`
--> tests/ui/clear_with_drain.rs:254:7
|
LL | s.drain(0..);
| ^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `String`
--> tests/ui/clear_with_drain.rs:259:7
|
LL | s.drain(usize::MIN..);
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `String`
--> tests/ui/clear_with_drain.rs:276:7
|
LL | s.drain(..);
| ^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `String`
--> tests/ui/clear_with_drain.rs:294:7
|
LL | s.drain(..s.len());
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `HashSet`
--> tests/ui/clear_with_drain.rs:333:9
|
LL | set.drain();
| ^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `HashMap`
--> tests/ui/clear_with_drain.rs:353:9
|
LL | map.drain();
| ^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `BinaryHeap`
--> tests/ui/clear_with_drain.rs:373:10
|
LL | heap.drain();
| ^^^^^^^ help: try: `clear()`
error: aborting due to 21 previous errors