未验证 提交 720eb123 编写于 作者: M Matthias Krüger 提交者: GitHub

Rollup merge of #98921 - TaKO8Ki:refactor-fulfillment-context-select, r=Dylan-DPC

Refactor: remove a redundant mutable variable
......@@ -131,8 +131,6 @@ fn select(&mut self, selcx: &mut SelectionContext<'a, 'tcx>) -> Vec<FulfillmentE
let span = debug_span!("select", obligation_forest_size = ?self.predicates.len());
let _enter = span.enter();
let mut errors = Vec::new();
// Process pending obligations.
let outcome: Outcome<_, _> = self.predicates.process_obligations(&mut FulfillProcessor {
selcx,
......@@ -142,7 +140,8 @@ fn select(&mut self, selcx: &mut SelectionContext<'a, 'tcx>) -> Vec<FulfillmentE
// FIXME: if we kept the original cache key, we could mark projection
// obligations as complete for the projection cache here.
errors.extend(outcome.errors.into_iter().map(to_fulfillment_error));
let errors: Vec<FulfillmentError<'tcx>> =
outcome.errors.into_iter().map(to_fulfillment_error).collect();
debug!(
"select({} predicates remaining, {} errors) done",
......@@ -728,7 +727,7 @@ fn process_projection_obligation(
}
return ProcessResult::Changed(vec![]);
} else {
tracing::debug!("Does NOT hold: {:?}", obligation);
debug!("Does NOT hold: {:?}", obligation);
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册