about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
diff options
context:
space:
mode:
authorThe Miri Cronjob Bot <miri@cron.bot>2024-12-20 05:02:14 +0000
committerThe Miri Cronjob Bot <miri@cron.bot>2024-12-20 05:02:14 +0000
commit5e2ce7eb7a76908404d9532cae2628d38cc62b4b (patch)
tree72ad079ee9a4274d62260de1889ae8a545ac8a74 /compiler/rustc_codegen_llvm/src/coverageinfo/llvm_cov.rs
parent09c8eb5d26c41ecac7b55a4c3cef51bd2bdce507 (diff)
parent214587c89d527dd0ccbe1f2150c737d3bdee67b0 (diff)
downloadrust-5e2ce7eb7a76908404d9532cae2628d38cc62b4b.tar.gz
rust-5e2ce7eb7a76908404d9532cae2628d38cc62b4b.zip
Merge from rustc
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<_>>();