Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library/alloc/src/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2473,7 +2473,7 @@ impl<F: ?Sized + Future + Unpin, A: Allocator> Future for Box<F, A> {
}

#[stable(feature = "box_error", since = "1.8.0")]
impl<E: Error> Error for Box<E> {
impl<E: Error, A: Allocator> Error for Box<E, A> {
#[allow(deprecated)]
fn cause(&self) -> Option<&dyn Error> {
Error::cause(&**self)
Expand Down
8 changes: 4 additions & 4 deletions library/alloc/src/io/impls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl<B: BufRead + ?Sized> BufRead for &mut B {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<R: Read + ?Sized> Read for Box<R> {
impl<R: Read + ?Sized, A: Allocator> Read for Box<R, A> {
#[inline]
fn read(&mut self, buf: &mut [u8]) -> io::Result<usize> {
(**self).read(buf)
Expand Down Expand Up @@ -148,7 +148,7 @@ impl<T> SizeHint for Box<T> {
}

#[stable(feature = "rust1", since = "1.0.0")]
impl<W: Write + ?Sized> Write for Box<W> {
impl<W: Write + ?Sized, A: Allocator> Write for Box<W, A> {
#[inline]
fn write(&mut self, buf: &[u8]) -> io::Result<usize> {
(**self).write(buf)
Expand Down Expand Up @@ -185,7 +185,7 @@ impl<W: Write + ?Sized> Write for Box<W> {
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<S: Seek + ?Sized> Seek for Box<S> {
impl<S: Seek + ?Sized, A: Allocator> Seek for Box<S, A> {
#[inline]
fn seek(&mut self, pos: SeekFrom) -> io::Result<u64> {
(**self).seek(pos)
Expand All @@ -212,7 +212,7 @@ impl<S: Seek + ?Sized> Seek for Box<S> {
}
}
#[stable(feature = "rust1", since = "1.0.0")]
impl<B: BufRead + ?Sized> BufRead for Box<B> {
impl<B: BufRead + ?Sized, A: Allocator> BufRead for Box<B, A> {
#[inline]
fn fill_buf(&mut self) -> io::Result<&[u8]> {
(**self).fill_buf()
Expand Down
3 changes: 2 additions & 1 deletion library/std/src/os/fd/owned.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
use moto_rt::libc;

use super::raw::{AsRawFd, FromRawFd, IntoRawFd, RawFd};
use crate::alloc::Allocator;
#[cfg(not(target_os = "trusty"))]
use crate::fs;
use crate::marker::PhantomData;
Expand Down Expand Up @@ -474,7 +475,7 @@ impl<T: AsFd + ?Sized> AsFd for crate::rc::UniqueRc<T> {
}

#[stable(feature = "asfd_ptrs", since = "1.64.0")]
impl<T: AsFd + ?Sized> AsFd for Box<T> {
impl<T: AsFd + ?Sized, A: Allocator> AsFd for Box<T, A> {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
(**self).as_fd()
Expand Down
3 changes: 2 additions & 1 deletion library/std/src/os/fd/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use moto_rt::libc;

#[cfg(target_os = "motor")]
use super::owned::OwnedFd;
use crate::alloc::Allocator;
#[cfg(not(target_os = "trusty"))]
use crate::fs;
use crate::io;
Expand Down Expand Up @@ -282,7 +283,7 @@ impl<T: AsRawFd + ?Sized> AsRawFd for crate::rc::UniqueRc<T> {
}

#[stable(feature = "asrawfd_ptrs", since = "1.63.0")]
impl<T: AsRawFd> AsRawFd for Box<T> {
impl<T: AsRawFd, A: Allocator> AsRawFd for Box<T, A> {
#[inline]
fn as_raw_fd(&self) -> RawFd {
(**self).as_raw_fd()
Expand Down
3 changes: 2 additions & 1 deletion library/std/src/os/solid/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

#![unstable(feature = "solid_ext", issue = "none")]

use crate::alloc::Allocator;
use crate::marker::PhantomData;
use crate::mem::ManuallyDrop;
use crate::sys::{AsInner, FromInner, IntoInner};
Expand Down Expand Up @@ -283,7 +284,7 @@ impl<T: AsFd> AsFd for crate::rc::Rc<T> {
}
}

impl<T: AsFd> AsFd for Box<T> {
impl<T: AsFd, A: Allocator> AsFd for Box<T, A> {
#[inline]
fn as_fd(&self) -> BorrowedFd<'_> {
(**self).as_fd()
Expand Down
3 changes: 2 additions & 1 deletion library/std/src/os/windows/io/handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![stable(feature = "io_safety", since = "1.63.0")]

use super::raw::{AsRawHandle, FromRawHandle, IntoRawHandle, RawHandle};
use crate::alloc::Allocator;
use crate::marker::PhantomData;
use crate::mem::ManuallyDrop;
use crate::sys::{AsInner, FromInner, IntoInner, cvt};
Expand Down Expand Up @@ -491,7 +492,7 @@ impl<T: AsHandle + ?Sized> AsHandle for crate::rc::UniqueRc<T> {
}

#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
impl<T: AsHandle + ?Sized> AsHandle for Box<T> {
impl<T: AsHandle + ?Sized, A: Allocator> AsHandle for Box<T, A> {
#[inline]
fn as_handle(&self) -> BorrowedHandle<'_> {
(**self).as_handle()
Expand Down
3 changes: 2 additions & 1 deletion library/std/src/os/windows/io/socket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#![stable(feature = "io_safety", since = "1.63.0")]

use super::raw::{AsRawSocket, FromRawSocket, IntoRawSocket, RawSocket};
use crate::alloc::Allocator;
use crate::marker::PhantomData;
use crate::mem::{self, ManuallyDrop};
#[cfg(not(target_vendor = "uwp"))]
Expand Down Expand Up @@ -275,7 +276,7 @@ impl<T: AsSocket + ?Sized> AsSocket for crate::rc::UniqueRc<T> {
}

#[stable(feature = "as_windows_ptrs", since = "1.71.0")]
impl<T: AsSocket> AsSocket for Box<T> {
impl<T: AsSocket, A: Allocator> AsSocket for Box<T, A> {
#[inline]
fn as_socket(&self) -> BorrowedSocket<'_> {
(**self).as_socket()
Expand Down
Loading