rust/tests/ui/clear_with_drain.stderr
2023-03-26 19:12:37 +02:00

41 lines
1.1 KiB
Plaintext

error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:16: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:19:7
|
LL | v.drain(usize::MIN..v.len()); // Nay
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:33:7
|
LL | v.drain(0..); // Nay
| ^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:36:7
|
LL | v.drain(usize::MIN..); // Nay
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:50:7
|
LL | v.drain(..); // Nay
| ^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:64:7
|
LL | v.drain(..v.len()); // Nay
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
error: aborting due to 6 previous errors