Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions compiler/rustc_trait_selection/src/solve/fulfill.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ impl<'tcx> ObligationStorage<'tcx> {
);
})
}

fn num_pending(&self) -> usize {
self.pending.len()
}
}

impl<'tcx, E: 'tcx> FulfillmentCtxt<'tcx, E> {
Expand Down Expand Up @@ -181,6 +185,9 @@ where

fn select_where_possible(&mut self, infcx: &InferCtxt<'tcx>) -> Vec<E> {
assert_eq!(self.usable_in_snapshot, infcx.num_open_snapshots());
if self.obligations.num_pending() == 0 {
return vec![];
}
let mut errors = Vec::new();
loop {
let mut any_changed = false;
Expand Down
Loading