diff options
| author | Aman Arora <me@aman-arora.com> | 2021-08-25 03:52:24 -0400 |
|---|---|---|
| committer | Aman Arora <me@aman-arora.com> | 2021-08-25 03:52:24 -0400 |
| commit | a216d666ca535d3cfcc8839fd3cb3d5e483e2d7e (patch) | |
| tree | 13cd767f917164996e2ba4b755fe920d6b5df9f7 | |
| parent | e5484cec0e3f60b2a0010505cd355639f75a2973 (diff) | |
| download | rust-a216d666ca535d3cfcc8839fd3cb3d5e483e2d7e.tar.gz rust-a216d666ca535d3cfcc8839fd3cb3d5e483e2d7e.zip | |
type_implements_trait consider obligation failure on overflow
| -rw-r--r-- | compiler/rustc_trait_selection/src/infer.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index ea074192d23..c55b379741e 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) } } |
