Add more from the std

This commit is contained in:
2026-03-18 14:59:16 +01:00
parent 9413fba265
commit 51780b3a78
35 changed files with 9176 additions and 1270 deletions

View File

@@ -1,5 +1,5 @@
use crate::fmt;
use core::panic::RefUnwindSafe;
use crate::panic::RefUnwindSafe;
use crate::sync::nonpoison::{Condvar, Mutex};
/// A barrier enables multiple threads to synchronize the beginning

View File

@@ -2,7 +2,7 @@ use super::once::OnceExclusiveState;
use crate::cell::UnsafeCell;
use crate::mem::ManuallyDrop;
use crate::ops::{Deref, DerefMut};
use core::panic::{RefUnwindSafe, UnwindSafe};
use crate::panic::{RefUnwindSafe, UnwindSafe};
use crate::sync::Once;
use crate::{fmt, ptr};

View File

@@ -150,7 +150,7 @@ mod zero;
pub use error::*;
use crate::fmt;
use core::panic::{RefUnwindSafe, UnwindSafe};
use crate::panic::{RefUnwindSafe, UnwindSafe};
use crate::time::{Duration, Instant};
/// Creates a new asynchronous channel, returning the sender/receiver halves.

View File

@@ -4,7 +4,7 @@
//! example use case would be for initializing an FFI library.
use crate::fmt;
use core::panic::{RefUnwindSafe, UnwindSafe};
use crate::panic::{RefUnwindSafe, UnwindSafe};
use crate::sys::sync as sys;
/// A low-level synchronization primitive for one-time global execution.

View File

@@ -3,7 +3,7 @@ use crate::cell::UnsafeCell;
use crate::fmt;
use crate::marker::PhantomData;
use crate::mem::MaybeUninit;
use core::panic::{RefUnwindSafe, UnwindSafe};
use crate::panic::{RefUnwindSafe, UnwindSafe};
use crate::sync::Once;
/// A synchronization primitive which can nominally be written to only once.

View File

@@ -88,8 +88,8 @@ use crate::sys::sync as sys;
/// [`unwrap()`]: Result::unwrap
/// [`PoisonError`]: super::PoisonError
/// [`into_inner`]: super::PoisonError::into_inner
/// [panic hook]: core::panic::set_hook
/// [`catch_unwind`]: core::panic::catch_unwind
/// [panic hook]: crate::panic::set_hook
/// [`catch_unwind`]: crate::panic::catch_unwind
/// [`Cell`]: crate::cell::Cell
///
/// # Examples

View File

@@ -1,7 +1,7 @@
use crate::cell::UnsafeCell;
use crate::fmt;
use crate::ops::Deref;
use core::panic::{RefUnwindSafe, UnwindSafe};
use crate::panic::{RefUnwindSafe, UnwindSafe};
use crate::sys::sync as sys;
use crate::thread::{ThreadId, current_id};