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
This commit is contained in:
bors 2024-09-22 23:14:12 +00:00
commit d14c1c75ab

View File

@ -844,7 +844,7 @@ fn from_thin_lto_modules(
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 }