Skip to content

Commit 5087f44

Browse files
committed
Do not flood if state is empty.
1 parent 2863ecf commit 5087f44

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_mir_transform/src/jump_threading.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,9 @@ impl<'a, 'tcx> TOFinder<'a, 'tcx> {
351351
extra_elem: Option<TrackElem>,
352352
state: &mut ConditionSet<'a>,
353353
) {
354+
if state.is_empty() {
355+
return;
356+
}
354357
let mut places_to_exclude = FxHashSet::default();
355358
self.map.for_each_aliasing_place(place.as_ref(), extra_elem, &mut |vi| {
356359
places_to_exclude.insert(vi);

0 commit comments

Comments
 (0)