We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Send
Sync
ThinBox<T>
1 parent c25e3db commit ee56f95Copy full SHA for ee56f95
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