Skip to content

Commit 26fdf26

Browse files
committed
Auto merge of #118412 - matthiaskrgr:rollup-ghzhti2, r=matthiaskrgr
Rollup of 6 pull requests Successful merges: - #118193 (Add missing period in `std::process::Command` docs) - #118222 (unify read_to_end and io::copy impls for reading into a Vec) - #118323 (give dev-friendly error message for incorrect config profiles) - #118378 (Perform LTO optimisations with wasm-ld + -Clinker-plugin-lto) - #118399 (Clean dead codes in miri) - #118410 (update test for new LLVM 18 codegen) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 194eb2c + a80fde6 commit 26fdf26

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

src/shims/unix/fs.rs

-26
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ pub trait FileDescriptor: std::fmt::Debug + Any {
6666
fn is_tty(&self, _communicate_allowed: bool) -> bool {
6767
false
6868
}
69-
70-
#[cfg(unix)]
71-
fn as_unix_host_fd(&self) -> Option<i32> {
72-
None
73-
}
7469
}
7570

7671
impl dyn FileDescriptor {
@@ -150,12 +145,6 @@ impl FileDescriptor for FileHandle {
150145
Ok(Box::new(FileHandle { file: duplicated, writable: self.writable }))
151146
}
152147

153-
#[cfg(unix)]
154-
fn as_unix_host_fd(&self) -> Option<i32> {
155-
use std::os::unix::io::AsRawFd;
156-
Some(self.file.as_raw_fd())
157-
}
158-
159148
fn is_tty(&self, communicate_allowed: bool) -> bool {
160149
communicate_allowed && self.file.is_terminal()
161150
}
@@ -183,11 +172,6 @@ impl FileDescriptor for io::Stdin {
183172
Ok(Box::new(io::stdin()))
184173
}
185174

186-
#[cfg(unix)]
187-
fn as_unix_host_fd(&self) -> Option<i32> {
188-
Some(libc::STDIN_FILENO)
189-
}
190-
191175
fn is_tty(&self, communicate_allowed: bool) -> bool {
192176
communicate_allowed && self.is_terminal()
193177
}
@@ -220,11 +204,6 @@ impl FileDescriptor for io::Stdout {
220204
Ok(Box::new(io::stdout()))
221205
}
222206

223-
#[cfg(unix)]
224-
fn as_unix_host_fd(&self) -> Option<i32> {
225-
Some(libc::STDOUT_FILENO)
226-
}
227-
228207
fn is_tty(&self, communicate_allowed: bool) -> bool {
229208
communicate_allowed && self.is_terminal()
230209
}
@@ -250,11 +229,6 @@ impl FileDescriptor for io::Stderr {
250229
Ok(Box::new(io::stderr()))
251230
}
252231

253-
#[cfg(unix)]
254-
fn as_unix_host_fd(&self) -> Option<i32> {
255-
Some(libc::STDERR_FILENO)
256-
}
257-
258232
fn is_tty(&self, communicate_allowed: bool) -> bool {
259233
communicate_allowed && self.is_terminal()
260234
}

0 commit comments

Comments
 (0)