rust/tests/ui/clear_with_drain.stderr

41 lines
1.1 KiB
Plaintext

error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:17: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:20:7
|
LL | v.drain(usize::MIN..v.len()); // Nay
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:35: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(usize::MIN..); // Nay
| ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:52:7
|
LL | v.drain(..); // Nay
| ^^^^^^^^^ help: try: `clear()`
error: `drain` used to clear a `Vec`
--> $DIR/clear_with_drain.rs:66:7
|
LL | v.drain(..v.len()); // Nay
| ^^^^^^^^^^^^^^^^ help: try: `clear()`
error: aborting due to 6 previous errors