From a216d666ca535d3cfcc8839fd3cb3d5e483e2d7e Mon Sep 17 00:00:00 2001 From: Aman Arora Date: Wed, 25 Aug 2021 03:52:24 -0400 Subject: [PATCH] type_implements_trait consider obligation failure on overflow --- compiler/rustc_trait_selection/src/infer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index ea074192d23b..c55b379741ee 100644 --- a/compiler/rustc_trait_selection/src/infer.rs +++ b/compiler/rustc_trait_selection/src/infer.rs @@ -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) } }