about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-04-26 05:18:22 +0000
committerbors <bors@rust-lang.org>2025-04-26 05:18:22 +0000
commit5ae50d3b2182f81eea4e4d90e8da3653547215b5 (patch)
treeb7dd25708b89658c91cde6ae2b44582a867f370a /compiler/rustc_codegen_ssa/src
parentd3508a8ad0163fab0c9b2188b3adf43c87200788 (diff)
parentc781c9ae94ef94a5b144b2ac6f5fd2075f16f854 (diff)
downloadrust-5ae50d3b2182f81eea4e4d90e8da3653547215b5.tar.gz
rust-5ae50d3b2182f81eea4e4d90e8da3653547215b5.zip
Auto merge of #140324 - matthiaskrgr:rollup-jlzvdre, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #139865 (Stabilize proc_macro::Span::{start,end,line,column}.)
 - #140086 (If creating a temporary directory fails with permission denied then retry with backoff)
 - #140216 (Document that "extern blocks must be unsafe" in Rust 2024)
 - #140253 (Add XtensaAsmPrinter)
 - #140272 (Improve error message for `||` (or) in let chains)
 - #140305 (Track per-obligation recursion depth only if there is inference in the new solver)
 - #140306 (handle specialization in the new trait solver)
 - #140308 (stall generator witness obligations: add regression test)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/back/archive.rs4
-rw-r--r--compiler/rustc_codegen_ssa/src/back/link.rs5
2 files changed, 4 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/archive.rs b/compiler/rustc_codegen_ssa/src/back/archive.rs
index 34c84c64070..1e1bdfb5977 100644
--- a/compiler/rustc_codegen_ssa/src/back/archive.rs
+++ b/compiler/rustc_codegen_ssa/src/back/archive.rs
@@ -13,9 +13,9 @@ use object::read::archive::ArchiveFile;
 use object::read::macho::FatArch;
 use rustc_data_structures::fx::FxIndexSet;
 use rustc_data_structures::memmap::Mmap;
+use rustc_fs_util::TempDirBuilder;
 use rustc_session::Session;
 use rustc_span::Symbol;
-use tempfile::Builder as TempFileBuilder;
 use tracing::trace;
 
 use super::metadata::search_for_section;
@@ -501,7 +501,7 @@ impl<'a> ArArchiveBuilder<'a> {
         // it creates. We need it to be the default mode for back compat reasons however. (See
         // #107495) To handle this we are telling tempfile to create a temporary directory instead
         // and then inside this directory create a file using File::create.
-        let archive_tmpdir = TempFileBuilder::new()
+        let archive_tmpdir = TempDirBuilder::new()
             .suffix(".temp-archive")
             .tempdir_in(output.parent().unwrap_or_else(|| Path::new("")))
             .map_err(|err| {
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index f0c47ac41e8..323538969d7 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -18,7 +18,7 @@ use rustc_data_structures::fx::FxIndexSet;
 use rustc_data_structures::memmap::Mmap;
 use rustc_data_structures::temp_dir::MaybeTempDir;
 use rustc_errors::{DiagCtxtHandle, LintDiagnostic};
-use rustc_fs_util::{fix_windows_verbatim_for_gcc, try_canonicalize};
+use rustc_fs_util::{TempDirBuilder, fix_windows_verbatim_for_gcc, try_canonicalize};
 use rustc_hir::def_id::{CrateNum, LOCAL_CRATE};
 use rustc_macros::LintDiagnostic;
 use rustc_metadata::fs::{METADATA_FILENAME, copy_to_stdout, emit_wrapper_file};
@@ -48,7 +48,6 @@ use rustc_target::spec::{
     LinkerFeatures, LinkerFlavor, LinkerFlavorCli, Lld, PanicStrategy, RelocModel, RelroLevel,
     SanitizerSet, SplitDebuginfo,
 };
-use tempfile::Builder as TempFileBuilder;
 use tracing::{debug, info, warn};
 
 use super::archive::{ArchiveBuilder, ArchiveBuilderBuilder};
@@ -100,7 +99,7 @@ pub fn link_binary(
         });
 
         if outputs.outputs.should_link() {
-            let tmpdir = TempFileBuilder::new()
+            let tmpdir = TempDirBuilder::new()
                 .prefix("rustc")
                 .tempdir()
                 .unwrap_or_else(|error| sess.dcx().emit_fatal(errors::CreateTempDir { error }));