Skip to content

Commit 69e5b2f

Browse files
committed
Do not report overflow error.
1 parent 6b34825 commit 69e5b2f

File tree

1 file changed

+3
-0
lines changed
  • compiler/rustc_trait_selection/src/traits

1 file changed

+3
-0
lines changed

compiler/rustc_trait_selection/src/traits/mod.rs

+3
Original file line numberDiff line numberDiff line change
@@ -432,6 +432,9 @@ pub fn impossible_predicates<'tcx>(
432432
debug!("impossible_predicates(predicates={:?})", predicates);
433433

434434
let result = tcx.infer_ctxt().enter(|infcx| {
435+
// HACK: Set tainted by errors to gracefully exit in case of overflow.
436+
infcx.set_tainted_by_errors();
437+
435438
let param_env = ty::ParamEnv::reveal_all();
436439
let mut selcx = SelectionContext::new(&infcx);
437440
let mut fulfill_cx = FulfillmentContext::new();

0 commit comments

Comments
 (0)