about summary refs log tree commit diff
path: root/library/std/src/sys
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2022-03-08 16:26:10 -0500
committerRalf Jung <post@ralfj.de>2022-03-08 16:26:10 -0500
commit2a2b212ea3fd8e8bbc4bd209593a943b44fd9aee (patch)
tree851cd0bc69d2705b14ebb79e3daa5187d4fd8e10 /library/std/src/sys
parent64187b837486be90b897c7014572aa3537dc9b27 (diff)
downloadrust-2a2b212ea3fd8e8bbc4bd209593a943b44fd9aee.tar.gz
rust-2a2b212ea3fd8e8bbc4bd209593a943b44fd9aee.zip
remove_dir_all: use fallback implementation on Miri
Diffstat (limited to 'library/std/src/sys')
-rw-r--r--library/std/src/sys/unix/fs.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/library/std/src/sys/unix/fs.rs b/library/std/src/sys/unix/fs.rs
index 03684608f75..ef8a57bdd2e 100644
--- a/library/std/src/sys/unix/fs.rs
+++ b/library/std/src/sys/unix/fs.rs
@@ -1480,14 +1480,14 @@ pub fn chroot(dir: &Path) -> io::Result<()> {
 
 pub use remove_dir_impl::remove_dir_all;
 
-// Fallback for REDOX and ESP-IDF
-#[cfg(any(target_os = "redox", target_os = "espidf"))]
+// Fallback for REDOX and ESP-IDF (and Miri)
+#[cfg(any(target_os = "redox", target_os = "espidf", miri))]
 mod remove_dir_impl {
     pub use crate::sys_common::fs::remove_dir_all;
 }
 
 // Modern implementation using openat(), unlinkat() and fdopendir()
-#[cfg(not(any(target_os = "redox", target_os = "espidf")))]
+#[cfg(not(any(target_os = "redox", target_os = "espidf", miri)))]
 mod remove_dir_impl {
     use super::{cstr, lstat, Dir, DirEntry, InnerReadDir, ReadDir};
     use crate::ffi::CStr;