We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 430d6ed + 3213399 commit 3684df7Copy full SHA for 3684df7
compiler/rustc_trait_selection/src/solve/fulfill.rs
@@ -118,6 +118,10 @@ impl<'tcx> ObligationStorage<'tcx> {
118
);
119
})
120
}
121
+
122
+ fn num_pending(&self) -> usize {
123
+ self.pending.len()
124
+ }
125
126
127
impl<'tcx, E: 'tcx> FulfillmentCtxt<'tcx, E> {
@@ -181,6 +185,9 @@ where
181
185
182
186
fn select_where_possible(&mut self, infcx: &InferCtxt<'tcx>) -> Vec<E> {
183
187
assert_eq!(self.usable_in_snapshot, infcx.num_open_snapshots());
188
+ if self.obligations.num_pending() == 0 {
189
+ return vec![];
190
184
191
let mut errors = Vec::new();
192
loop {
193
let mut any_changed = false;
0 commit comments