Skip to content

Commit 2a2b212

Browse files
committed
remove_dir_all: use fallback implementation on Miri
1 parent 64187b8 commit 2a2b212

File tree

1 file changed

+3
-3
lines changed
  • library/std/src/sys/unix

1 file changed

+3
-3
lines changed

library/std/src/sys/unix/fs.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,14 +1480,14 @@ pub fn chroot(dir: &Path) -> io::Result<()> {
14801480

14811481
pub use remove_dir_impl::remove_dir_all;
14821482

1483-
// Fallback for REDOX and ESP-IDF
1484-
#[cfg(any(target_os = "redox", target_os = "espidf"))]
1483+
// Fallback for REDOX and ESP-IDF (and Miri)
1484+
#[cfg(any(target_os = "redox", target_os = "espidf", miri))]
14851485
mod remove_dir_impl {
14861486
pub use crate::sys_common::fs::remove_dir_all;
14871487
}
14881488

14891489
// Modern implementation using openat(), unlinkat() and fdopendir()
1490-
#[cfg(not(any(target_os = "redox", target_os = "espidf")))]
1490+
#[cfg(not(any(target_os = "redox", target_os = "espidf", miri)))]
14911491
mod remove_dir_impl {
14921492
use super::{cstr, lstat, Dir, DirEntry, InnerReadDir, ReadDir};
14931493
use crate::ffi::CStr;

0 commit comments

Comments
 (0)