Prefer if cfg!.
This commit is contained in:
parent
0e866af1f7
commit
e5a55dc2c5
2 changed files with 14 additions and 12 deletions
|
@ -989,7 +989,7 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||||
self.ecx.machine.written_only_inside_own_block_locals =
|
self.ecx.machine.written_only_inside_own_block_locals =
|
||||||
written_only_inside_own_block_locals;
|
written_only_inside_own_block_locals;
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
if cfg!(debug_assertions) {
|
||||||
for (local, &mode) in self.ecx.machine.can_const_prop.iter_enumerated() {
|
for (local, &mode) in self.ecx.machine.can_const_prop.iter_enumerated() {
|
||||||
match mode {
|
match mode {
|
||||||
ConstPropMode::FullConstProp => {}
|
ConstPropMode::FullConstProp => {}
|
||||||
|
@ -999,4 +999,5 @@ impl<'tcx> MutVisitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -708,7 +708,7 @@ impl<'tcx> Visitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||||
self.ecx.machine.written_only_inside_own_block_locals =
|
self.ecx.machine.written_only_inside_own_block_locals =
|
||||||
written_only_inside_own_block_locals;
|
written_only_inside_own_block_locals;
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
if cfg!(debug_assertions) {
|
||||||
for (local, &mode) in self.ecx.machine.can_const_prop.iter_enumerated() {
|
for (local, &mode) in self.ecx.machine.can_const_prop.iter_enumerated() {
|
||||||
match mode {
|
match mode {
|
||||||
ConstPropMode::FullConstProp => {}
|
ConstPropMode::FullConstProp => {}
|
||||||
|
@ -718,4 +718,5 @@ impl<'tcx> Visitor<'tcx> for ConstPropagator<'_, 'tcx> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue