diff options
| author | bors <bors@rust-lang.org> | 2025-03-19 09:28:24 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-19 09:28:24 +0000 |
| commit | c4b38a596767c9c6275c937cf3a2d4b9612b4875 (patch) | |
| tree | 1bb311e5bed9a78befa59f0a7f7074c483f55fca /library/std/src/sys/stdio/unix.rs | |
| parent | 1370611c0ae0c7232bcd073e15046bae6b519e50 (diff) | |
| parent | f364f3ec71dae419e0fc2916f1eee3f200ea7095 (diff) | |
| download | rust-c4b38a596767c9c6275c937cf3a2d4b9612b4875.tar.gz rust-c4b38a596767c9c6275c937cf3a2d4b9612b4875.zip | |
Auto merge of #138653 - matthiaskrgr:rollup-fwwqmr7, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #136320 (exit: document interaction with C) - #138080 (Leave a breadcrumb towards bootstrap config documentation in `bootstrap.toml`) - #138301 (Implement `read_buf` for Hermit) - #138569 (rustdoc-json: Add tests for `#[repr(...)]`) - #138635 (Extract `for_each_immediate_subpat` from THIR pattern visitors) - #138642 (Unvacation myself) - #138644 (Add `#[cfg(test)]` for Transition in dfa in `rustc_transmute`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/std/src/sys/stdio/unix.rs')
| -rw-r--r-- | library/std/src/sys/stdio/unix.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/library/std/src/sys/stdio/unix.rs b/library/std/src/sys/stdio/unix.rs index 8d133857c59..08a06e0da9f 100644 --- a/library/std/src/sys/stdio/unix.rs +++ b/library/std/src/sys/stdio/unix.rs @@ -3,9 +3,7 @@ use hermit_abi::{EBADF, STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; #[cfg(target_family = "unix")] use libc::{EBADF, STDERR_FILENO, STDIN_FILENO, STDOUT_FILENO}; -#[cfg(target_family = "unix")] -use crate::io::BorrowedCursor; -use crate::io::{self, IoSlice, IoSliceMut}; +use crate::io::{self, BorrowedCursor, IoSlice, IoSliceMut}; use crate::mem::ManuallyDrop; #[cfg(target_os = "hermit")] use crate::os::hermit::io::FromRawFd; @@ -28,7 +26,6 @@ impl io::Read for Stdin { unsafe { ManuallyDrop::new(FileDesc::from_raw_fd(STDIN_FILENO)).read(buf) } } - #[cfg(not(target_os = "hermit"))] fn read_buf(&mut self, buf: BorrowedCursor<'_>) -> io::Result<()> { unsafe { ManuallyDrop::new(FileDesc::from_raw_fd(STDIN_FILENO)).read_buf(buf) } } |
