@@ -175,7 +175,7 @@ fn compare_method_predicate_entailment<'tcx>(
175175 let cause = ObligationCause :: new (
176176 impl_m_span,
177177 impl_m_def_id,
178- ObligationCauseCode :: CompareImplItemObligation {
178+ ObligationCauseCode :: CompareImplItem {
179179 impl_item_def_id : impl_m_def_id,
180180 trait_item_def_id : trait_m. def_id ,
181181 kind : impl_m. kind ,
@@ -236,7 +236,7 @@ fn compare_method_predicate_entailment<'tcx>(
236236 let cause = ObligationCause :: new (
237237 span,
238238 impl_m_def_id,
239- ObligationCauseCode :: CompareImplItemObligation {
239+ ObligationCauseCode :: CompareImplItem {
240240 impl_item_def_id : impl_m_def_id,
241241 trait_item_def_id : trait_m. def_id ,
242242 kind : impl_m. kind ,
@@ -464,7 +464,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
464464 let cause = ObligationCause :: new (
465465 return_span,
466466 impl_m_def_id,
467- ObligationCauseCode :: CompareImplItemObligation {
467+ ObligationCauseCode :: CompareImplItem {
468468 impl_item_def_id : impl_m_def_id,
469469 trait_item_def_id : trait_m. def_id ,
470470 kind : impl_m. kind ,
@@ -819,7 +819,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
819819 ObligationCause :: new (
820820 self . span ,
821821 self . body_id ,
822- ObligationCauseCode :: BindingObligation ( proj. def_id , pred_span) ,
822+ ObligationCauseCode :: SpannedWhereClause ( proj. def_id , pred_span) ,
823823 ) ,
824824 self . param_env ,
825825 pred,
@@ -1752,7 +1752,7 @@ fn compare_const_predicate_entailment<'tcx>(
17521752 let impl_ty = tcx. type_of ( impl_ct_def_id) . instantiate_identity ( ) ;
17531753
17541754 let trait_ty = tcx. type_of ( trait_ct. def_id ) . instantiate ( tcx, trait_to_impl_args) ;
1755- let code = ObligationCauseCode :: CompareImplItemObligation {
1755+ let code = ObligationCauseCode :: CompareImplItem {
17561756 impl_item_def_id : impl_ct_def_id,
17571757 trait_item_def_id : trait_ct. def_id ,
17581758 kind : impl_ct. kind ,
@@ -1924,7 +1924,7 @@ fn compare_type_predicate_entailment<'tcx>(
19241924 let cause = ObligationCause :: new (
19251925 span,
19261926 impl_ty_def_id,
1927- ObligationCauseCode :: CompareImplItemObligation {
1927+ ObligationCauseCode :: CompareImplItem {
19281928 impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
19291929 trait_item_def_id : trait_ty. def_id ,
19301930 kind : impl_ty. kind ,
@@ -2012,9 +2012,9 @@ pub(super) fn check_type_bounds<'tcx>(
20122012 ) ;
20132013 let mk_cause = |span : Span | {
20142014 let code = if span. is_dummy ( ) {
2015- traits :: ItemObligation ( trait_ty. def_id )
2015+ ObligationCauseCode :: WhereClause ( trait_ty. def_id )
20162016 } else {
2017- traits :: BindingObligation ( trait_ty. def_id , span)
2017+ ObligationCauseCode :: SpannedWhereClause ( trait_ty. def_id , span)
20182018 } ;
20192019 ObligationCause :: new ( impl_ty_span, impl_ty_def_id, code)
20202020 } ;
@@ -2251,7 +2251,8 @@ fn try_report_async_mismatch<'tcx>(
22512251 } ;
22522252
22532253 for error in errors {
2254- if let traits:: BindingObligation ( def_id, _) = * error. root_obligation . cause . code ( )
2254+ if let ObligationCauseCode :: SpannedWhereClause ( def_id, _) =
2255+ * error. root_obligation . cause . code ( )
22552256 && def_id == async_future_def_id
22562257 && let Some ( proj) = error. root_obligation . predicate . to_opt_poly_projection_pred ( )
22572258 && let Some ( proj) = proj. no_bound_vars ( )
0 commit comments