From f466a7563d4b0448a0b242474dd862b37e3f8d11 Mon Sep 17 00:00:00 2001 From: yukang Date: Mon, 22 Aug 2022 22:22:15 +0800 Subject: [PATCH] remove hack fix since we don't have no overflow diagnostic --- compiler/rustc_trait_selection/src/traits/mod.rs | 3 --- 1 file changed, 3 deletions(-) diff --git a/compiler/rustc_trait_selection/src/traits/mod.rs b/compiler/rustc_trait_selection/src/traits/mod.rs index 85ff6e23711..d922f893321 100644 --- a/compiler/rustc_trait_selection/src/traits/mod.rs +++ b/compiler/rustc_trait_selection/src/traits/mod.rs @@ -473,9 +473,6 @@ pub fn impossible_predicates<'tcx>( debug!("impossible_predicates(predicates={:?})", predicates); let result = tcx.infer_ctxt().enter(|infcx| { - // HACK: Set tainted by errors to gracefully exit in case of overflow. - infcx.set_tainted_by_errors(); - let param_env = ty::ParamEnv::reveal_all(); let ocx = ObligationCtxt::new(&infcx); let predicates = ocx.normalize(ObligationCause::dummy(), param_env, predicates);