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:
@@ -54,6 +54,8 @@ impl MirPass<'_> for UnreachablePropagation {
|
||||
patch.apply(body);
|
||||
|
||||
// We do want do keep some unreachable blocks, but make them empty.
|
||||
// The order in which we clear bb statements does not matter.
|
||||
#[allow(rustc::potential_query_instability)]
|
||||
for bb in unreachable_blocks {
|
||||
body.basic_blocks_mut()[bb].statements.clear();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user