diff --git a/library/std/src/sys/pal/teeos/mod.rs b/library/std/src/sys/pal/teeos/mod.rs index d40c10663fd1..f76c26d3c966 100644 --- a/library/std/src/sys/pal/teeos/mod.rs +++ b/library/std/src/sys/pal/teeos/mod.rs @@ -7,7 +7,6 @@ #![allow(dead_code)] pub mod os; -#[allow(non_upper_case_globals)] #[path = "../unix/time.rs"] pub mod time; diff --git a/library/std/src/sys/time/mod.rs b/library/std/src/sys/time/mod.rs index 3efab78518c2..6cd1850e7cca 100644 --- a/library/std/src/sys/time/mod.rs +++ b/library/std/src/sys/time/mod.rs @@ -1,4 +1,8 @@ cfg_select! { + target_os = "hermit" => { + mod hermit; + use hermit as imp; + } target_os = "motor" => { use moto_rt::time as imp; } @@ -14,7 +18,11 @@ cfg_select! { mod uefi; use uefi as imp; } - target_family = "unix" => { + any( + target_os = "teeos", + target_family = "unix", + target_os = "wasi", + ) => { mod unix; use unix as imp; } diff --git a/library/std/src/sys/time/unix.rs b/library/std/src/sys/time/unix.rs index 21d246bc850a..944cb552cad9 100644 --- a/library/std/src/sys/time/unix.rs +++ b/library/std/src/sys/time/unix.rs @@ -15,7 +15,7 @@ impl SystemTime { pub const MIN: SystemTime = SystemTime { t: Timespec::MIN }; - #[cfg_attr(any(target_os = "horizon", target_os = "hurd"), allow(unused))] + #[cfg_attr(any(target_os = "horizon", target_os = "hurd", target_os = "teeos"), expect(unused))] pub fn new(tv_sec: i64, tv_nsec: i64) -> Result { Ok(SystemTime { t: Timespec::new(tv_sec, tv_nsec)? }) }