Move fallback_has_occurred to FnCtxt
This commit is contained in:
parent
e6fead46dc
commit
bc345d7bd0
21 changed files with 52 additions and 64 deletions
|
@ -471,7 +471,7 @@ fn check_opaque_meets_bounds<'tcx>(
|
|||
// version.
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
}
|
||||
match origin {
|
||||
// Checked when type checking the function containing them.
|
||||
|
|
|
@ -405,7 +405,7 @@ fn compare_predicate_entailment<'tcx>(
|
|||
// version.
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
return Err(reported);
|
||||
}
|
||||
|
||||
|
@ -538,7 +538,7 @@ pub fn collect_trait_impl_trait_tys<'tcx>(
|
|||
// RPITs.
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
return Err(reported);
|
||||
}
|
||||
|
||||
|
@ -1431,7 +1431,7 @@ pub(crate) fn raw_compare_const_impl<'tcx>(
|
|||
// version.
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
return Err(infcx.err_ctxt().report_fulfillment_errors(&errors, None, false));
|
||||
return Err(infcx.err_ctxt().report_fulfillment_errors(&errors, None));
|
||||
}
|
||||
|
||||
// FIXME return `ErrorReported` if region obligations error?
|
||||
|
@ -1549,7 +1549,7 @@ fn compare_type_predicate_entailment<'tcx>(
|
|||
// version.
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
return Err(reported);
|
||||
}
|
||||
|
||||
|
@ -1769,7 +1769,7 @@ pub fn check_type_bounds<'tcx>(
|
|||
// version.
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
let reported = infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
return Err(reported);
|
||||
}
|
||||
|
||||
|
|
|
@ -104,7 +104,7 @@ pub(super) fn enter_wf_checking_ctxt<'tcx, F>(
|
|||
f(&mut wfcx);
|
||||
let errors = wfcx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -321,7 +321,7 @@ fn visit_implementation_of_dispatch_from_dyn<'tcx>(tcx: TyCtxt<'tcx>, impl_did:
|
|||
}),
|
||||
);
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
}
|
||||
|
||||
// Finally, resolve all regions.
|
||||
|
@ -561,7 +561,7 @@ pub fn coerce_unsized_info<'tcx>(tcx: TyCtxt<'tcx>, impl_did: DefId) -> CoerceUn
|
|||
predicate_for_trait_def(tcx, param_env, cause, trait_def_id, 0, source, &[target.into()]);
|
||||
let errors = traits::fully_solve_obligation(&infcx, predicate);
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
}
|
||||
|
||||
// Finally, resolve all regions.
|
||||
|
|
|
@ -155,7 +155,7 @@ fn get_impl_substs<'tcx>(
|
|||
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
ocx.infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
ocx.infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
return None;
|
||||
}
|
||||
|
||||
|
|
|
@ -173,7 +173,7 @@ fn require_same_types<'tcx>(
|
|||
match &errors[..] {
|
||||
[] => true,
|
||||
errors => {
|
||||
infcx.err_ctxt().report_fulfillment_errors(errors, None, false);
|
||||
infcx.err_ctxt().report_fulfillment_errors(errors, None);
|
||||
false
|
||||
}
|
||||
}
|
||||
|
@ -336,7 +336,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) {
|
|||
ocx.register_bound(cause, param_env, norm_return_ty, term_did);
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None, false);
|
||||
infcx.err_ctxt().report_fulfillment_errors(&errors, None);
|
||||
error = true;
|
||||
}
|
||||
// now we can take the return type of the given main function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue