mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-30 04:56:25 +03:00
Rollup merge of #70342 - withoutboats:io-slice-send-sync, r=Mark-Simulacrum
IoSlice/IoSliceMut should be Send and Sync Closes #70308
This commit is contained in:
@@ -951,6 +951,12 @@ fn take(self, limit: u64) -> Take<Self>
|
||||
#[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 @@ fn deref_mut(&mut self) -> &mut [u8] {
|
||||
#[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 {
|
||||
|
||||
Reference in New Issue
Block a user