未验证 提交 8d4b5ff1 编写于 作者: M Mazdak Farrokhzad 提交者: GitHub

Rollup merge of #70342 - withoutboats:io-slice-send-sync, r=Mark-Simulacrum

IoSlice/IoSliceMut should be Send and Sync

Closes #70308
......@@ -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 {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册