@@ -175,7 +175,7 @@ fn compare_method_predicate_entailment<'tcx>(
175
175
let cause = ObligationCause :: new (
176
176
impl_m_span,
177
177
impl_m_def_id,
178
- ObligationCauseCode :: CompareImplItemObligation {
178
+ ObligationCauseCode :: CompareImplItem {
179
179
impl_item_def_id : impl_m_def_id,
180
180
trait_item_def_id : trait_m. def_id ,
181
181
kind : impl_m. kind ,
@@ -236,7 +236,7 @@ fn compare_method_predicate_entailment<'tcx>(
236
236
let cause = ObligationCause :: new (
237
237
span,
238
238
impl_m_def_id,
239
- ObligationCauseCode :: CompareImplItemObligation {
239
+ ObligationCauseCode :: CompareImplItem {
240
240
impl_item_def_id : impl_m_def_id,
241
241
trait_item_def_id : trait_m. def_id ,
242
242
kind : impl_m. kind ,
@@ -464,7 +464,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
464
464
let cause = ObligationCause :: new (
465
465
return_span,
466
466
impl_m_def_id,
467
- ObligationCauseCode :: CompareImplItemObligation {
467
+ ObligationCauseCode :: CompareImplItem {
468
468
impl_item_def_id : impl_m_def_id,
469
469
trait_item_def_id : trait_m. def_id ,
470
470
kind : impl_m. kind ,
@@ -819,7 +819,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
819
819
ObligationCause :: new (
820
820
self . span ,
821
821
self . body_id ,
822
- ObligationCauseCode :: BindingObligation ( proj. def_id , pred_span) ,
822
+ ObligationCauseCode :: SpannedWhereClause ( proj. def_id , pred_span) ,
823
823
) ,
824
824
self . param_env ,
825
825
pred,
@@ -1752,7 +1752,7 @@ fn compare_const_predicate_entailment<'tcx>(
1752
1752
let impl_ty = tcx. type_of ( impl_ct_def_id) . instantiate_identity ( ) ;
1753
1753
1754
1754
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 {
1756
1756
impl_item_def_id : impl_ct_def_id,
1757
1757
trait_item_def_id : trait_ct. def_id ,
1758
1758
kind : impl_ct. kind ,
@@ -1924,7 +1924,7 @@ fn compare_type_predicate_entailment<'tcx>(
1924
1924
let cause = ObligationCause :: new (
1925
1925
span,
1926
1926
impl_ty_def_id,
1927
- ObligationCauseCode :: CompareImplItemObligation {
1927
+ ObligationCauseCode :: CompareImplItem {
1928
1928
impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
1929
1929
trait_item_def_id : trait_ty. def_id ,
1930
1930
kind : impl_ty. kind ,
@@ -2012,9 +2012,9 @@ pub(super) fn check_type_bounds<'tcx>(
2012
2012
) ;
2013
2013
let mk_cause = |span : Span | {
2014
2014
let code = if span. is_dummy ( ) {
2015
- traits :: ItemObligation ( trait_ty. def_id )
2015
+ ObligationCauseCode :: WhereClause ( trait_ty. def_id )
2016
2016
} else {
2017
- traits :: BindingObligation ( trait_ty. def_id , span)
2017
+ ObligationCauseCode :: SpannedWhereClause ( trait_ty. def_id , span)
2018
2018
} ;
2019
2019
ObligationCause :: new ( impl_ty_span, impl_ty_def_id, code)
2020
2020
} ;
@@ -2251,7 +2251,8 @@ fn try_report_async_mismatch<'tcx>(
2251
2251
} ;
2252
2252
2253
2253
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 ( )
2255
2256
&& def_id == async_future_def_id
2256
2257
&& let Some ( proj) = error. root_obligation . predicate . to_opt_poly_projection_pred ( )
2257
2258
&& let Some ( proj) = proj. no_bound_vars ( )
0 commit comments