rustc_mir_transform: Enforce rustc::potential_query_instability
lint
Stop allowing `rustc::potential_query_instability` on all of rustc_mir_transform and instead allow it on a case-by-case basis if it is safe to do so. In this particular crate, all instances were safe to allow.
This commit is contained in:
parent
b6a8c762ee
commit
6d8fb57d1a
3 changed files with 4 additions and 1 deletions
|
@ -670,6 +670,8 @@ impl<'tcx> Visitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
|||
// This loop can get very hot for some bodies: it check each local in each bb.
|
||||
// To avoid this quadratic behaviour, we only clear the locals that were modified inside
|
||||
// the current block.
|
||||
// The order in which we remove consts does not matter.
|
||||
#[allow(rustc::potential_query_instability)]
|
||||
for local in written_only_inside_own_block_locals.drain() {
|
||||
debug_assert_eq!(
|
||||
self.ecx.machine.can_const_prop[local],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue