mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 23:04:33 +00:00
fs::get_path solarish version.
This commit is contained in:
parent
e1c28e0c85
commit
2ea770d067
@ -1198,7 +1198,12 @@ impl FromRawFd for File {
|
||||
|
||||
impl fmt::Debug for File {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
#[cfg(any(target_os = "linux", target_os = "netbsd"))]
|
||||
#[cfg(any(
|
||||
target_os = "linux",
|
||||
target_os = "netbsd",
|
||||
target_os = "illumos",
|
||||
target_os = "solaris"
|
||||
))]
|
||||
fn get_path(fd: c_int) -> Option<PathBuf> {
|
||||
let mut p = PathBuf::from("/proc/self/fd");
|
||||
p.push(&fd.to_string());
|
||||
@ -1253,7 +1258,9 @@ impl fmt::Debug for File {
|
||||
target_os = "macos",
|
||||
target_os = "vxworks",
|
||||
all(target_os = "freebsd", target_arch = "x86_64"),
|
||||
target_os = "netbsd"
|
||||
target_os = "netbsd",
|
||||
target_os = "illumos",
|
||||
target_os = "solaris"
|
||||
)))]
|
||||
fn get_path(_fd: c_int) -> Option<PathBuf> {
|
||||
// FIXME(#24570): implement this for other Unix platforms
|
||||
|
Loading…
Reference in New Issue
Block a user