Preserve most sub-obligations in the projection cache

This commit is contained in:
Aaron Hill
2021-05-31 13:22:40 -05:00
parent 64929313f5
commit f2d9ee9c34
6 changed files with 41 additions and 82 deletions

View File

@@ -71,7 +71,7 @@ impl<'cx, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'cx, 'tcx> {
// Run canonical query. If overflow occurs, rerun from scratch but this time
// in standard trait query mode so that overflow is handled appropriately
// within `SelectionContext`.
self.tcx.evaluate_obligation(c_pred)
self.tcx.at(obligation.cause.span(self.tcx)).evaluate_obligation(c_pred)
}
// Helper function that canonicalizes and runs the query. If an