diff options
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;  | 
