about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-09-22 23:14:12 +0000
committerbors <bors@rust-lang.org>2024-09-22 23:14:12 +0000
commitd14c1c75ab284d382bd1e9c499596c274f1abe58 (patch)
treefb42f18dde7a99b1936efcd62ce4fffe05a2a4a3 /compiler/rustc_codegen_llvm/src
parent6c6d210089e4589afee37271862b9f88ba1d7755 (diff)
parent6419aeb1ec71fab8a6d47a0f14a8391cecab5f39 (diff)
downloadrust-d14c1c75ab284d382bd1e9c499596c274f1abe58.tar.gz
rust-d14c1c75ab284d382bd1e9c499596c274f1abe58.zip
Auto merge of #130680 - saethlin:module-name-to-str, r=jieyouxu
Call module_name_to_str instead of just unwrapping

This makes the ICE message in https://github.com/rust-lang/rust/issues/130678 more clear. It looks like not calling this function was just an oversight in https://github.com/rust-lang/rust/pull/76859, but clearly not a major one because it's taken us 4 years to notice.

try-job: i686-msvc
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
-rw-r--r--compiler/rustc_codegen_llvm/src/back/lto.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_llvm/src/back/lto.rs b/compiler/rustc_codegen_llvm/src/back/lto.rs
index 66479ad7f34..90a3da307d5 100644
--- a/compiler/rustc_codegen_llvm/src/back/lto.rs
+++ b/compiler/rustc_codegen_llvm/src/back/lto.rs
@@ -844,7 +844,7 @@ impl ThinLTOKeysMap {
                     llvm::LLVMRustComputeLTOCacheKey(rust_str, module.identifier, data.0);
                 })
                 .expect("Invalid ThinLTO module key");
-                (name.clone().into_string().unwrap(), key)
+                (module_name_to_str(name).to_string(), key)
             })
             .collect();
         Self { keys }