1
Fork 0

Query-ify global limit attribute handling

This commit is contained in:
Aaron Hill 2021-06-25 18:48:26 -05:00
parent 90442458ac
commit ff15b5e2c7
No known key found for this signature in database
GPG key ID: B4087E510E98B164
30 changed files with 153 additions and 91 deletions

View file

@ -993,7 +993,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
obligation: &Obligation<'tcx, T>,
error_obligation: &Obligation<'tcx, V>,
) -> Result<(), OverflowError> {
if !self.infcx.tcx.sess.recursion_limit().value_within_limit(obligation.recursion_depth) {
if !self.infcx.tcx.recursion_limit(()).value_within_limit(obligation.recursion_depth) {
match self.query_mode {
TraitQueryMode::Standard => {
self.infcx().report_overflow_error(error_obligation, true);