We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Send
Sync
ThinBox<T>
1 parent 2f3ddd9 commit 6400736Copy full SHA for 6400736
library/alloc/src/boxed/thin.rs
@@ -33,6 +33,14 @@ pub struct ThinBox<T: ?Sized> {
33
_marker: PhantomData<T>,
34
}
35
36
+/// `ThinBox<T>` is `Send` if `T` is `Send` because the data is owned.
37
+#[unstable(feature = "thin_box", issue = "92791")]
38
+unsafe impl<T: ?Sized + Send> Send for ThinBox<T> {}
39
+
40
+/// `ThinBox<T>` is `Sync` if `T` is `Sync` because the data is owned.
41
42
+unsafe impl<T: ?Sized + Sync> Sync for ThinBox<T> {}
43
44
#[unstable(feature = "thin_box", issue = "92791")]
45
impl<T> ThinBox<T> {
46
/// Moves a type to the heap with its `Metadata` stored in the heap allocation instead of on
0 commit comments