mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-14 09:36:06 +00:00
29 lines
745 B
Plaintext
29 lines
745 B
Plaintext
error: `drain` used to clear a `Vec`
|
|
--> $DIR/clear_with_drain.rs:13:7
|
|
|
|
|
LL | v.drain(0..v.len()); // Nay
|
|
| ^^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
|
= note: `-D clippy::clear-with-drain` implied by `-D warnings`
|
|
|
|
error: `drain` used to clear a `Vec`
|
|
--> $DIR/clear_with_drain.rs:24:7
|
|
|
|
|
LL | v.drain(0..); // Nay
|
|
| ^^^^^^^^^^ help: try: `clear()`
|
|
|
|
error: `drain` used to clear a `Vec`
|
|
--> $DIR/clear_with_drain.rs:38:7
|
|
|
|
|
LL | v.drain(..); // Nay
|
|
| ^^^^^^^^^ help: try: `clear()`
|
|
|
|
error: `drain` used to clear a `Vec`
|
|
--> $DIR/clear_with_drain.rs:52:7
|
|
|
|
|
LL | v.drain(..v.len()); // Nay
|
|
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
|
|
|
|
error: aborting due to 4 previous errors
|
|
|