diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index 55f3b628ce8e9..8091e9f05016e 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -952,7 +952,10 @@ impl Seek for File { } #[stable(feature = "io_traits_arc", since = "1.73.0")] -impl Read for Arc { +impl Read for Arc +where + for<'a> &'a T: Read, +{ fn read(&mut self, buf: &mut [u8]) -> io::Result { (&**self).read(buf) } @@ -974,7 +977,10 @@ impl Read for Arc { } } #[stable(feature = "io_traits_arc", since = "1.73.0")] -impl Write for Arc { +impl Write for Arc +where + for<'a> &'a T: Write, +{ fn write(&mut self, buf: &[u8]) -> io::Result { (&**self).write(buf) } @@ -991,7 +997,10 @@ impl Write for Arc { } } #[stable(feature = "io_traits_arc", since = "1.73.0")] -impl Seek for Arc { +impl Seek for Arc +where + for<'a> &'a T: Seek, +{ fn seek(&mut self, pos: SeekFrom) -> io::Result { (&**self).seek(pos) }