about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/clean.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bootstrap/clean.rs b/src/bootstrap/clean.rs
index 3216c1af267..3b73dc1c7df 100644
--- a/src/bootstrap/clean.rs
+++ b/src/bootstrap/clean.rs
@@ -75,10 +75,10 @@ fn rm_rf(path: &Path) {
             do_op(path, "remove dir", |p| {
                 fs::remove_dir(p).or_else(|e| {
                     // Check for dir not empty on Windows
+                    // FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
+                    // match on `e.kind()` instead.
                     #[cfg(windows)]
-                    if matches!(e.kind(), std::io::ErrorKind::Other)
-                        && e.raw_os_error() == Some(145)
-                    {
+                    if e.raw_os_error() == Some(145) {
                         return Ok(());
                     }