summary refs log tree commit diff
path: root/library/std/src/thread
diff options
context:
space:
mode:
authorUrgau <urgau@numericable.fr>2023-03-26 16:18:30 +0200
committerUrgau <urgau@numericable.fr>2023-05-10 19:36:01 +0200
commitd36e390d8176babedcf326581959958d447170cd (patch)
treeea5b730bbc57f6a0a9e3c08ddd4052755a0a7714 /library/std/src/thread
parentf7b831ac8a897273f78b9f47165cf8e54066ce4b (diff)
downloadrust-d36e390d8176babedcf326581959958d447170cd.tar.gz
rust-d36e390d8176babedcf326581959958d447170cd.zip
Remove and fix useless drop of reference
Diffstat (limited to 'library/std/src/thread')
-rw-r--r--library/std/src/thread/tests.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/library/std/src/thread/tests.rs b/library/std/src/thread/tests.rs
index 6c9ce6fa0dd..b65e2572cc5 100644
--- a/library/std/src/thread/tests.rs
+++ b/library/std/src/thread/tests.rs
@@ -375,7 +375,9 @@ fn test_scoped_threads_nll() {
     // this is mostly a *compilation test* for this exact function:
     fn foo(x: &u8) {
         thread::scope(|s| {
-            s.spawn(|| drop(x));
+            s.spawn(|| match x {
+                _ => (),
+            });
         });
     }
     // let's also run it for good measure