Skip to content

Commit 7d3df3e

Browse files
committed
Auto merge of #147111 - BoxyUwU:rename_obligation_processing_apis, r=lcnr
rename `select_where_possible` and `select_all_or_error` r? `@lcnr` I find that people get confused by what these methods do. The verb "select" is not really that helpful and is just a reference to somewhat of an implementation detail of the trait solvers that doesn't even apply to most obligation kinds. I went with `try_evaluate_obligations` and `evaluate_obligations_error_on_ambiguity`. This maintains consistency with the new solvers `evalute_goal` entry point. it's unfortunate that we say obligations rather than goals but this maintains consistency with `register_obligation` functions which I think is a good thing. In the long term possibly we rename `Obligation` or `Goal` 🤷‍♀️
2 parents ca00aa9 + 5949862 commit 7d3df3e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/future_not_send.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ impl<'tcx> LateLintPass<'tcx> for FutureNotSend {
9090
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
9191
let cause = traits::ObligationCause::misc(span, fn_def_id);
9292
ocx.register_bound(cause, cx.param_env, ret_ty, send_trait);
93-
let send_errors = ocx.select_all_or_error();
93+
let send_errors = ocx.evaluate_obligations_error_on_ambiguity();
9494

9595
// Allow errors that try to prove `Send` for types that "mention" a generic parameter at the "top
9696
// level".

clippy_utils/src/qualify_min_const_fn.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ fn is_ty_const_destruct<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>, body: &Body<'tcx>
475475

476476
let ocx = ObligationCtxt::new(&infcx);
477477
ocx.register_obligations(impl_src.nested_obligations());
478-
ocx.select_all_or_error().is_empty()
478+
ocx.evaluate_obligations_error_on_ambiguity().is_empty()
479479
}
480480

481481
!ty.needs_drop(tcx, ConstCx::new(tcx, body).typing_env)

0 commit comments

Comments
 (0)