diff --git a/library/alloc/src/boxed/thin.rs b/library/alloc/src/boxed/thin.rs index 807c035fdbd0d..203e5dff0c77f 100644 --- a/library/alloc/src/boxed/thin.rs +++ b/library/alloc/src/boxed/thin.rs @@ -33,6 +33,14 @@ pub struct ThinBox { _marker: PhantomData, } +/// `ThinBox` is `Send` if `T` is `Send` because the data is owned. +#[unstable(feature = "thin_box", issue = "92791")] +unsafe impl Send for ThinBox {} + +/// `ThinBox` is `Sync` if `T` is `Sync` because the data is owned. +#[unstable(feature = "thin_box", issue = "92791")] +unsafe impl Sync for ThinBox {} + #[unstable(feature = "thin_box", issue = "92791")] impl ThinBox { /// Moves a type to the heap with its `Metadata` stored in the heap allocation instead of on