diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-15 12:58:41 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-05-17 12:58:33 -0400 |
| commit | 2025e44ef894f51a557522fc3057af7dce47a3ce (patch) | |
| tree | c487bff3b46a1d2ffa69f7087fd370ec430520b2 /compiler/rustc_hir_analysis/src | |
| parent | 550d1b4fb6de23990f4108815c3b1a9d1659e5c4 (diff) | |
| download | rust-2025e44ef894f51a557522fc3057af7dce47a3ce.tar.gz rust-2025e44ef894f51a557522fc3057af7dce47a3ce.zip | |
to_opt_poly_X_pred -> as_X_clause
Diffstat (limited to 'compiler/rustc_hir_analysis/src')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/compare_impl_item.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir_analysis/src/check/wfcheck.rs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs index 19645049d0c..44bf8fd2d93 100644 --- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs +++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs @@ -2250,7 +2250,7 @@ fn try_report_async_mismatch<'tcx>( for error in errors { if let ObligationCauseCode::WhereClause(def_id, _) = *error.root_obligation.cause.code() && def_id == async_future_def_id - && let Some(proj) = error.root_obligation.predicate.to_opt_poly_projection_pred() + && let Some(proj) = error.root_obligation.predicate.as_projection_clause() && let Some(proj) = proj.no_bound_vars() && infcx.can_eq( error.root_obligation.param_env, diff --git a/compiler/rustc_hir_analysis/src/check/wfcheck.rs b/compiler/rustc_hir_analysis/src/check/wfcheck.rs index 059e4141e15..e137aab2109 100644 --- a/compiler/rustc_hir_analysis/src/check/wfcheck.rs +++ b/compiler/rustc_hir_analysis/src/check/wfcheck.rs @@ -1350,12 +1350,12 @@ fn check_impl<'tcx>( // We already have a better span. continue; } - if let Some(pred) = obligation.predicate.to_opt_poly_trait_pred() + if let Some(pred) = obligation.predicate.as_trait_clause() && pred.skip_binder().self_ty() == trait_ref.self_ty() { obligation.cause.span = hir_self_ty.span; } - if let Some(pred) = obligation.predicate.to_opt_poly_projection_pred() + if let Some(pred) = obligation.predicate.as_projection_clause() && pred.skip_binder().self_ty() == trait_ref.self_ty() { obligation.cause.span = hir_self_ty.span; |
