Rollup merge of #100368 - chenyukang:fix-100321, r=lcnr
InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed> Fixes #100321. Use Cell<Option<ErrorGuaranteed>> to guarantee that we emit an error when that flag is set.
This commit is contained in:
commit
f42cdf76e1
3 changed files with 11 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue