diff --git a/src/libstd/sys/unix/fs.rs b/src/libstd/sys/unix/fs.rs index 59dceba89532..4e6fde5c29de 100644 --- a/src/libstd/sys/unix/fs.rs +++ b/src/libstd/sys/unix/fs.rs @@ -284,12 +284,7 @@ impl DirEntry { lstat(&self.path()) } - #[cfg(target_os = "solaris")] - pub fn file_type(&self) -> io::Result { - stat(&self.path()).map(|m| m.file_type()) - } - - #[cfg(target_os = "haiku")] + #[cfg(any(target_os = "solaris", target_os = "haiku"))] pub fn file_type(&self) -> io::Result { lstat(&self.path()).map(|m| m.file_type()) }