Use an helper to move the files · rust-lang/rust@4db00fe

Original file line numberDiff line numberDiff line change

@@ -26,7 +26,9 @@ use crate::core::build_steps::tool::{self, Tool};

2626

use crate::core::builder::{Builder, Kind, RunConfig, ShouldRun, Step};

2727

use crate::core::config::TargetSelection;

2828

use crate::utils::channel::{self, Info};

29-

use crate::utils::helpers::{exe, is_dylib, output, t, target_supports_cranelift_backend, timeit};

29+

use crate::utils::helpers::{

30+

exe, is_dylib, move_file, output, t, target_supports_cranelift_backend, timeit,

31+

};

3032

use crate::utils::tarball::{GeneratedTarball, OverlayKind, Tarball};

3133

use crate::{Compiler, DependencyType, Mode, LLVM_TOOLS};

3234

@@ -2024,7 +2026,7 @@ impl Step for Extended {

20242026

builder.run(&mut cmd);

20252027
20262028

if !builder.config.dry_run() {

2027-

t!(fs::rename(exe.join(&filename), distdir(builder).join(&filename)));

2029+

t!(move_file(exe.join(&filename), distdir(builder).join(&filename)));

20282030

}

20292031

}

20302032

}