about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2024-11-30 19:24:43 +0100
committerGitHub <noreply@github.com>2024-11-30 19:24:43 +0100
commitbdb44d0227c12cf7aca3fcb14ac6a6e5ac4da750 (patch)
tree131682d095ed290254889063783c04fd9f83cb55 /src/bootstrap
parentec000a7e8599e4b2ea14c00123ee9ff78bdfe4e4 (diff)
parentfd9019852e2e54f5b35b40c7c6b8af237dd405b2 (diff)
downloadrust-bdb44d0227c12cf7aca3fcb14ac6a6e5ac4da750.tar.gz
rust-bdb44d0227c12cf7aca3fcb14ac6a6e5ac4da750.zip
Rollup merge of #133673 - onur-ozkan:windows-fixme, r=Kobzol
replace hard coded error id with `ErrorKind::DirectoryNotEmpty`

Resolves an internal bootstrap FIXME.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/clean.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bootstrap/src/core/build_steps/clean.rs b/src/bootstrap/src/core/build_steps/clean.rs
index d857de96cce..61cc9eeed55 100644
--- a/src/bootstrap/src/core/build_steps/clean.rs
+++ b/src/bootstrap/src/core/build_steps/clean.rs
@@ -203,10 +203,8 @@ fn rm_rf(path: &Path) {
 
             do_op(path, "remove dir", |p| match fs::remove_dir(p) {
                 // Check for dir not empty on Windows
-                // FIXME: Once `ErrorKind::DirectoryNotEmpty` is stabilized,
-                // match on `e.kind()` instead.
                 #[cfg(windows)]
-                Err(e) if e.raw_os_error() == Some(145) => Ok(()),
+                Err(e) if e.kind() == ErrorKind::DirectoryNotEmpty => Ok(()),
                 r => r,
             });
         }