Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/infer/coerce.rs')
-rw-r--r--crates/hir-ty/src/infer/coerce.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/hir-ty/src/infer/coerce.rs b/crates/hir-ty/src/infer/coerce.rs
index ce5c98979d..4620da7147 100644
--- a/crates/hir-ty/src/infer/coerce.rs
+++ b/crates/hir-ty/src/infer/coerce.rs
@@ -160,7 +160,7 @@ impl<'a, 'b, 'db> Coerce<'a, 'b, 'db> {
Ok(InferOk { value, obligations }) => {
let mut ocx = ObligationCtxt::new(this.infer_ctxt());
ocx.register_obligations(obligations);
- if ocx.select_where_possible().is_empty() {
+ if ocx.try_evaluate_obligations().is_empty() {
Ok(InferOk { value, obligations: ocx.into_pending_obligations() })
} else {
Err(TypeError::Mismatch)
@@ -722,7 +722,7 @@ impl<'a, 'b, 'db> Coerce<'a, 'b, 'db> {
Some(PredicateKind::AliasRelate(..)) => {
let mut ocx = ObligationCtxt::new(self.infer_ctxt());
ocx.register_obligation(obligation);
- if !ocx.select_where_possible().is_empty() {
+ if !ocx.try_evaluate_obligations().is_empty() {
return Err(TypeError::Mismatch);
}
coercion.obligations.extend(ocx.into_pending_obligations());
@@ -1093,7 +1093,7 @@ impl<'db> InferenceContext<'_, 'db> {
prev_ty,
new_ty,
)?;
- if ocx.select_where_possible().is_empty() {
+ if ocx.try_evaluate_obligations().is_empty() {
Ok(InferOk { value, obligations: ocx.into_pending_obligations() })
} else {
Err(TypeError::Mismatch)