Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustc_codegen_llvm: Enforce rustc::potential_query_instability lint #118865

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions compiler/rustc_codegen_llvm/src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,9 @@ impl ThinLTOKeysMap {
use std::io::Write;
let file = File::create(path)?;
let mut writer = io::BufWriter::new(file);
// The entries are loaded back into a hash map in `load_from_file()`, so
// the order in which we write them to file here does not matter.
#[allow(rustc::potential_query_instability)]
for (module, key) in &self.keys {
writeln!(writer, "{module} {key}")?;
}
Expand Down
5 changes: 5 additions & 0 deletions compiler/rustc_codegen_llvm/src/coverageinfo/mapgen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_codegen_llvm/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#![feature(never_type)]
#![feature(impl_trait_in_assoc_type)]
#![recursion_limit = "256"]
#![allow(rustc::potential_query_instability)]
#![deny(rustc::untranslatable_diagnostic)]
#![deny(rustc::diagnostic_outside_of_impl)]

Expand Down
Loading