about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src/coverageinfo
diff options
context:
space:
mode:
authorMartin Nordholts <martin.nordholts@codetale.se>2023-12-12 13:14:53 +0100
committerMartin Nordholts <martin.nordholts@codetale.se>2023-12-12 13:16:14 +0100
commitf44ccbab2bbdc538b739d6a1f5f9fbdb8339f8f8 (patch)
tree9659510c98b2a330ee6d4cff786367005bf7126d /compiler/rustc_codegen_llvm/src/coverageinfo
parent5b8bc568d28b2e922290c9a966b3231d0ce9398b (diff)
downloadrust-f44ccbab2bbdc538b739d6a1f5f9fbdb8339f8f8.tar.gz
rust-f44ccbab2bbdc538b739d6a1f5f9fbdb8339f8f8.zip
rustc_codegen_llvm: Enforce `rustc::potential_query_instability` lint
Stop allowing `rustc::potential_query_instability` on all of
`rustc_codegen_llvm` and instead allow it on a case-by-case basis. In
this case, both instances are safe to allow.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/coverageinfo')
-rw-r--r--compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
index 51df14df644..33bfde03a31 100644
--- a/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
+++ b/compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
@@ -58,6 +58,11 @@ pub fn finalize(cx: &CodegenCx<'_, '_>) {
         return;
     }
 
+    // The entries of the map are only used to get a list of all files with
+    // coverage info. In the end the list of files is passed into
+    // `GlobalFileTable::new()` which internally do `.sort_unstable_by()`, so
+    // the iteration order here does not matter.
+    #[allow(rustc::potential_query_instability)]
     let function_coverage_entries = function_coverage_map
         .into_iter()
         .map(|(instance, function_coverage)| (instance, function_coverage.into_finished()))