summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/clear_with_drain.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:39 +0000
commit1376c5a617be5c25655d0d7cb63e3beaa5a6e026 (patch)
tree3bb8d61aee02bc7a15eab3f36e3b921afc2075d0 /src/tools/clippy/tests/ui/clear_with_drain.stderr
parentReleasing progress-linux version 1.69.0+dfsg1-1~progress7.99u1. (diff)
downloadrustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.tar.xz
rustc-1376c5a617be5c25655d0d7cb63e3beaa5a6e026.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/clear_with_drain.stderr')
-rw-r--r--src/tools/clippy/tests/ui/clear_with_drain.stderr130
1 files changed, 130 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/clear_with_drain.stderr b/src/tools/clippy/tests/ui/clear_with_drain.stderr
new file mode 100644
index 000000000..20158da11
--- /dev/null
+++ b/src/tools/clippy/tests/ui/clear_with_drain.stderr
@@ -0,0 +1,130 @@
+error: `drain` used to clear a `Vec`
+ --> $DIR/clear_with_drain.rs:23:7
+ |
+LL | v.drain(0..v.len());
+ | ^^^^^^^^^^^^^^^^^ 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:27:7
+ |
+LL | v.drain(usize::MIN..v.len());
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `Vec`
+ --> $DIR/clear_with_drain.rs:46:7
+ |
+LL | v.drain(0..);
+ | ^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `Vec`
+ --> $DIR/clear_with_drain.rs:50:7
+ |
+LL | v.drain(usize::MIN..);
+ | ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `Vec`
+ --> $DIR/clear_with_drain.rs:66:7
+ |
+LL | v.drain(..);
+ | ^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `Vec`
+ --> $DIR/clear_with_drain.rs:83:7
+ |
+LL | v.drain(..v.len());
+ | ^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `VecDeque`
+ --> $DIR/clear_with_drain.rs:121:11
+ |
+LL | deque.drain(0..deque.len());
+ | ^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `VecDeque`
+ --> $DIR/clear_with_drain.rs:125:11
+ |
+LL | deque.drain(usize::MIN..deque.len());
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `VecDeque`
+ --> $DIR/clear_with_drain.rs:144:11
+ |
+LL | deque.drain(0..);
+ | ^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `VecDeque`
+ --> $DIR/clear_with_drain.rs:148:11
+ |
+LL | deque.drain(usize::MIN..);
+ | ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `VecDeque`
+ --> $DIR/clear_with_drain.rs:164:11
+ |
+LL | deque.drain(..);
+ | ^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `VecDeque`
+ --> $DIR/clear_with_drain.rs:181:11
+ |
+LL | deque.drain(..deque.len());
+ | ^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `String`
+ --> $DIR/clear_with_drain.rs:219:7
+ |
+LL | s.drain(0..s.len());
+ | ^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `String`
+ --> $DIR/clear_with_drain.rs:223:7
+ |
+LL | s.drain(usize::MIN..s.len());
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `String`
+ --> $DIR/clear_with_drain.rs:242:7
+ |
+LL | s.drain(0..);
+ | ^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `String`
+ --> $DIR/clear_with_drain.rs:246:7
+ |
+LL | s.drain(usize::MIN..);
+ | ^^^^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `String`
+ --> $DIR/clear_with_drain.rs:262:7
+ |
+LL | s.drain(..);
+ | ^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `String`
+ --> $DIR/clear_with_drain.rs:279:7
+ |
+LL | s.drain(..s.len());
+ | ^^^^^^^^^^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `HashSet`
+ --> $DIR/clear_with_drain.rs:317:9
+ |
+LL | set.drain();
+ | ^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `HashMap`
+ --> $DIR/clear_with_drain.rs:336:9
+ |
+LL | map.drain();
+ | ^^^^^^^ help: try: `clear()`
+
+error: `drain` used to clear a `BinaryHeap`
+ --> $DIR/clear_with_drain.rs:355:10
+ |
+LL | heap.drain();
+ | ^^^^^^^ help: try: `clear()`
+
+error: aborting due to 21 previous errors
+