diff --git a/library/std/src/fs.rs b/library/std/src/fs.rs index a220a3f56e9a8..6001b04d88edc 100644 --- a/library/std/src/fs.rs +++ b/library/std/src/fs.rs @@ -3036,6 +3036,9 @@ pub fn remove_dir_all>(path: P) -> io::Result<()> { /// Entries for the current and parent directories (typically `.` and `..`) are /// skipped. /// +/// The order in which `read_dir` returns entries can change between calls. If reproducible +/// ordering is required, the entries should be explicitly sorted. +/// /// # Platform-specific behavior /// /// This function currently corresponds to the `opendir` function on Unix