type_implements_trait consider obligation failure on overflow

This commit is contained in:
Aman Arora 2021-08-25 03:52:24 -04:00
parent e5484cec0e
commit a216d666ca

View File

@ -117,7 +117,7 @@ impl<'cx, 'tcx> InferCtxtExt<'tcx> for InferCtxt<'cx, 'tcx> {
recursion_depth: 0,
predicate: trait_ref.without_const().to_predicate(self.tcx),
};
self.evaluate_obligation_no_overflow(&obligation)
self.evaluate_obligation(&obligation).unwrap_or(traits::EvaluationResult::EvaluatedToErr)
}
}