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.
This commit is contained in:
Martin Nordholts 2023-12-12 13:14:53 +01:00
parent 5b8bc568d2
commit f44ccbab2b
3 changed files with 8 additions and 1 deletions

View file

@ -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}")?;
}