We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5148a0c commit 2830551Copy full SHA for 2830551
library/std/src/sys/pal/unix/thread.rs
@@ -363,6 +363,7 @@ impl Thread {
363
#[cfg(target_vendor = "apple")]
364
pub fn sleep_until(deadline: crate::time::Instant) {
365
use core::mem::MaybeUninit;
366
+
367
use super::time::Timespec;
368
369
let Timespec { tv_sec, tv_nsec } = deadline.into_inner().into_timespec();
library/std/tests/thread.rs
@@ -1,9 +1,8 @@
1
+#![feature(thread_sleep_until)]
2
use std::cell::{Cell, RefCell};
3
use std::sync::{Arc, Mutex};
4
use std::thread;
-use std::time::Duration;
5
-#[feature(thread_sleep_until)]
6
-use std::time::Instant;
+use std::time::{Duration, Instant};
7
8
#[test]
9
#[cfg_attr(any(target_os = "emscripten", target_os = "wasi"), ignore)] // no threads
0 commit comments