about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-01-23 16:56:11 +0800
committer许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-01-23 20:51:29 +0800
commite00e10c943947aa3d6a6bcbdf8ca035e9d8fd865 (patch)
tree2c81f94cfad72aced8203bdf76f2d0c222535c54
parent4b743a7a63511b3d142d58c9c45e699ff70c5363 (diff)
downloadrust-e00e10c943947aa3d6a6bcbdf8ca035e9d8fd865.tar.gz
rust-e00e10c943947aa3d6a6bcbdf8ca035e9d8fd865.zip
tests: cleanup `tests/ui/std/thread-sleep-ms.rs`
- Use `needs-threads` instead of `ignore-sgx`.
- Remove unnecessary import and `#![allow(unused_import)]`.
-rw-r--r--tests/ui/std/thread-sleep-ms.rs11
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/ui/std/thread-sleep-ms.rs b/tests/ui/std/thread-sleep-ms.rs
index 0a3d0253a20..2d668b8265c 100644
--- a/tests/ui/std/thread-sleep-ms.rs
+++ b/tests/ui/std/thread-sleep-ms.rs
@@ -1,12 +1,9 @@
 //@ run-pass
-//@ ignore-sgx not supported
-//@ ignore-emscripten
-// FIXME: test hangs on emscripten
-#![allow(deprecated)]
-#![allow(unused_imports)]
+//@ needs-threads
+//@ ignore-emscripten (FIXME: test hangs on emscripten)
 
-use std::thread;
+#![allow(deprecated)]
 
 fn main() {
-    thread::sleep_ms(250);
+    std::thread::sleep_ms(250);
 }