Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions library/std/src/sys/fs/unix.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#![allow(nonstandard_style)]
#![allow(unsafe_op_in_unsafe_fn)]
// miri has some special hacks here that make things unused.
#![cfg_attr(miri, allow(unused))]

#[cfg(test)]
mod tests;
Expand Down Expand Up @@ -988,7 +986,6 @@ impl Drop for DirStream {
fn drop(&mut self) {
// dirfd isn't supported everywhere
#[cfg(not(any(
miri,
target_os = "redox",
target_os = "nto",
target_os = "qnx",
Expand Down Expand Up @@ -1030,16 +1027,13 @@ impl DirEntry {
pub fn metadata(&self) -> io::Result<FileAttr> {
cfg_select! {
// Use directory handle where possible
all(
any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "android",
target_os = "fuchsia",
target_os = "hurd",
target_os = "illumos",
target_vendor = "apple",
),
not(miri) // no dirfd on Miri
any(
all(target_os = "linux", not(target_env = "musl")),
target_os = "android",
target_os = "fuchsia",
target_os = "hurd",
target_os = "illumos",
target_vendor = "apple",
) => {
let fd = cvt(unsafe { dirfd(self.dir.dirp.0) })?;

Expand Down
Loading