diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-28 16:09:56 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-28 16:09:56 +0100 |
| commit | 71b29e8a388a6620313a72710c6faf42d09ee505 (patch) | |
| tree | 45266ce9ebcddd78ba61163ea7366dd790a82cb9 | |
| parent | 3e202ead604be31f4c1a5798a296953d3159da7e (diff) | |
| parent | 72668dea6ba68c57d01ef98ae46924f0131fd8f0 (diff) | |
| download | rust-71b29e8a388a6620313a72710c6faf42d09ee505.tar.gz rust-71b29e8a388a6620313a72710c6faf42d09ee505.zip | |
Rollup merge of #118399 - mu001999:miri/cleanup, r=RalfJung
Clean dead codes in miri Detected by #118257
| -rw-r--r-- | src/tools/miri/src/shims/unix/fs.rs | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/src/tools/miri/src/shims/unix/fs.rs b/src/tools/miri/src/shims/unix/fs.rs index ba40a1b3c32..be30627cf0c 100644 --- a/src/tools/miri/src/shims/unix/fs.rs +++ b/src/tools/miri/src/shims/unix/fs.rs @@ -66,11 +66,6 @@ pub trait FileDescriptor: std::fmt::Debug + Any { fn is_tty(&self, _communicate_allowed: bool) -> bool { false } - - #[cfg(unix)] - fn as_unix_host_fd(&self) -> Option<i32> { - None - } } impl dyn FileDescriptor { @@ -150,12 +145,6 @@ impl FileDescriptor for FileHandle { Ok(Box::new(FileHandle { file: duplicated, writable: self.writable })) } - #[cfg(unix)] - fn as_unix_host_fd(&self) -> Option<i32> { - use std::os::unix::io::AsRawFd; - Some(self.file.as_raw_fd()) - } - fn is_tty(&self, communicate_allowed: bool) -> bool { communicate_allowed && self.file.is_terminal() } @@ -183,11 +172,6 @@ impl FileDescriptor for io::Stdin { Ok(Box::new(io::stdin())) } - #[cfg(unix)] - fn as_unix_host_fd(&self) -> Option<i32> { - Some(libc::STDIN_FILENO) - } - fn is_tty(&self, communicate_allowed: bool) -> bool { communicate_allowed && self.is_terminal() } @@ -220,11 +204,6 @@ impl FileDescriptor for io::Stdout { Ok(Box::new(io::stdout())) } - #[cfg(unix)] - fn as_unix_host_fd(&self) -> Option<i32> { - Some(libc::STDOUT_FILENO) - } - fn is_tty(&self, communicate_allowed: bool) -> bool { communicate_allowed && self.is_terminal() } @@ -250,11 +229,6 @@ impl FileDescriptor for io::Stderr { Ok(Box::new(io::stderr())) } - #[cfg(unix)] - fn as_unix_host_fd(&self) -> Option<i32> { - Some(libc::STDERR_FILENO) - } - fn is_tty(&self, communicate_allowed: bool) -> bool { communicate_allowed && self.is_terminal() } |
