diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2020-03-24 21:32:31 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-24 21:32:31 +0100 |
| commit | 8d4b5ff121f31c32d3e58fd14dde1a49fc5b0d68 (patch) | |
| tree | 4de7543fcb1c97d61217bc0df33d1277b9de5e0b /src | |
| parent | b8093bad581c8e23883f254f052fe7a3b7d14a3a (diff) | |
| parent | 03c64bf532ceec915f74460daf5344bb8ccf23d3 (diff) | |
| download | rust-8d4b5ff121f31c32d3e58fd14dde1a49fc5b0d68.tar.gz rust-8d4b5ff121f31c32d3e58fd14dde1a49fc5b0d68.zip | |
Rollup merge of #70342 - withoutboats:io-slice-send-sync, r=Mark-Simulacrum
IoSlice/IoSliceMut should be Send and Sync Closes #70308
Diffstat (limited to 'src')
| -rw-r--r-- | src/libstd/io/mod.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index 83c492fecf9..88d556229e4 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -951,6 +951,12 @@ pub trait Read { #[repr(transparent)] pub struct IoSliceMut<'a>(sys::io::IoSliceMut<'a>); +#[stable(feature = "iovec-send-sync", since = "1.44.0")] +unsafe impl<'a> Send for IoSliceMut<'a> {} + +#[stable(feature = "iovec-send-sync", since = "1.44.0")] +unsafe impl<'a> Sync for IoSliceMut<'a> {} + #[stable(feature = "iovec", since = "1.36.0")] impl<'a> fmt::Debug for IoSliceMut<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { @@ -1054,6 +1060,12 @@ impl<'a> DerefMut for IoSliceMut<'a> { #[repr(transparent)] pub struct IoSlice<'a>(sys::io::IoSlice<'a>); +#[stable(feature = "iovec-send-sync", since = "1.44.0")] +unsafe impl<'a> Send for IoSlice<'a> {} + +#[stable(feature = "iovec-send-sync", since = "1.44.0")] +unsafe impl<'a> Sync for IoSlice<'a> {} + #[stable(feature = "iovec", since = "1.36.0")] impl<'a> fmt::Debug for IoSlice<'a> { fn fmt(&self, fmt: &mut fmt::Formatter<'_>) -> fmt::Result { |
