This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +0
-18
lines changed
compiler/rustc_interface/src Expand file tree Collapse file tree 1 file changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -655,24 +655,6 @@ pub fn build_output_filenames(
655
655
}
656
656
}
657
657
658
- #[ cfg( not( target_os = "linux" ) ) ]
659
- pub fn non_durable_rename ( src : & Path , dst : & Path ) -> std:: io:: Result < ( ) > {
660
- std:: fs:: rename ( src, dst)
661
- }
662
-
663
- /// This function attempts to bypass the auto_da_alloc heuristic implemented by some filesystems
664
- /// such as btrfs and ext4. When renaming over a file that already exists then they will "helpfully"
665
- /// write back the source file before committing the rename in case a developer forgot some of
666
- /// the fsyncs in the open/write/fsync(file)/rename/fsync(dir) dance for atomic file updates.
667
- ///
668
- /// To avoid triggering this heuristic we delete the destination first, if it exists.
669
- /// The cost of an extra syscall is much lower than getting descheduled for the sync IO.
670
- #[ cfg( target_os = "linux" ) ]
671
- pub fn non_durable_rename ( src : & Path , dst : & Path ) -> std:: io:: Result < ( ) > {
672
- let _ = std:: fs:: remove_file ( dst) ;
673
- std:: fs:: rename ( src, dst)
674
- }
675
-
676
658
/// Returns a version string such as "1.46.0 (04488afe3 2020-08-24)"
677
659
pub fn version_str ( ) -> Option < & ' static str > {
678
660
option_env ! ( "CFG_VERSION" )
You can’t perform that action at this time.
0 commit comments