Skip to content

Commit

Permalink
Auto merge of rust-lang#130680 - saethlin:module-name-to-str, r=jieyouxu
Browse files Browse the repository at this point in the history
Call module_name_to_str instead of just unwrapping

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

try-job: i686-msvc
  • Loading branch information
bors committed Sep 22, 2024
2 parents 6c6d210 + 6419aeb commit d14c1c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down

0 comments on commit d14c1c7

Please sign in to comment.