Skip to content

Commit 8cb63c2

Browse files
committed
Do not flood if state is empty.
1 parent fabad67 commit 8cb63c2

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
@@ -345,6 +345,9 @@ impl<'a, 'tcx> TOFinder<'a, 'tcx> {
345345
extra_elem: Option<TrackElem>,
346346
state: &mut ConditionSet<'a>,
347347
) {
348+
if state.is_empty() {
349+
return;
350+
}
348351
let mut places_to_exclude = FxHashSet::default();
349352
self.map.for_each_aliasing_place(place.as_ref(), extra_elem, &mut |vi| {
350353
places_to_exclude.insert(vi);

0 commit comments

Comments
 (0)