about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
diff options
context:
space:
mode:
authorZalathar <Zalathar@users.noreply.github.com>2024-12-18 21:19:30 +1100
committerZalathar <Zalathar@users.noreply.github.com>2024-12-19 18:09:09 +1100
commit837a25dd41a1cc58cee093159a01f73719f330e8 (patch)
treeabebbc2feccd7c88a40b5becbeb07db04603aafb /compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
parent34ed51cb837d1dd755b9b97798a41c8cd0358ca6 (diff)
downloadrust-837a25dd41a1cc58cee093159a01f73719f330e8.tar.gz
rust-837a25dd41a1cc58cee093159a01f73719f330e8.zip
coverage: Identify source files by ID, not by interned filename
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs')
-rw-r--r--compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
index 086cf1f44a0..2cd7fa3225a 100644
--- a/compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
+++ b/compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
@@ -40,11 +40,10 @@ pub(crate) fn create_pgo_func_name_var<'ll>(
     }
 }
 
-pub(crate) fn write_filenames_to_buffer<'a>(
-    filenames: impl IntoIterator<Item = &'a str>,
-) -> Vec<u8> {
+pub(crate) fn write_filenames_to_buffer(filenames: &[impl AsRef<str>]) -> Vec<u8> {
     let (pointers, lengths) = filenames
         .into_iter()
+        .map(AsRef::as_ref)
         .map(|s: &str| (s.as_c_char_ptr(), s.len()))
         .unzip::<_, _, Vec<_>, Vec<_>>();