@@ -176,7 +176,7 @@ fn compare_method_predicate_entailment<'tcx>(
176
176
let cause = ObligationCause :: new (
177
177
impl_m_span,
178
178
impl_m_def_id,
179
- ObligationCauseCode :: CompareImplItemObligation {
179
+ ObligationCauseCode :: CompareImplItem {
180
180
impl_item_def_id : impl_m_def_id,
181
181
trait_item_def_id : trait_m. def_id ,
182
182
kind : impl_m. kind ,
@@ -237,7 +237,7 @@ fn compare_method_predicate_entailment<'tcx>(
237
237
let cause = ObligationCause :: new (
238
238
span,
239
239
impl_m_def_id,
240
- ObligationCauseCode :: CompareImplItemObligation {
240
+ ObligationCauseCode :: CompareImplItem {
241
241
impl_item_def_id : impl_m_def_id,
242
242
trait_item_def_id : trait_m. def_id ,
243
243
kind : impl_m. kind ,
@@ -465,7 +465,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
465
465
let cause = ObligationCause :: new (
466
466
return_span,
467
467
impl_m_def_id,
468
- ObligationCauseCode :: CompareImplItemObligation {
468
+ ObligationCauseCode :: CompareImplItem {
469
469
impl_item_def_id : impl_m_def_id,
470
470
trait_item_def_id : trait_m. def_id ,
471
471
kind : impl_m. kind ,
@@ -823,7 +823,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
823
823
ObligationCause :: new (
824
824
self . span ,
825
825
self . body_id ,
826
- ObligationCauseCode :: BindingObligation ( proj. def_id , pred_span) ,
826
+ ObligationCauseCode :: Where ( proj. def_id , pred_span) ,
827
827
) ,
828
828
self . param_env ,
829
829
pred,
@@ -1754,7 +1754,7 @@ fn compare_const_predicate_entailment<'tcx>(
1754
1754
let impl_ty = tcx. type_of ( impl_ct_def_id) . instantiate_identity ( ) ;
1755
1755
1756
1756
let trait_ty = tcx. type_of ( trait_ct. def_id ) . instantiate ( tcx, trait_to_impl_args) ;
1757
- let code = ObligationCauseCode :: CompareImplItemObligation {
1757
+ let code = ObligationCauseCode :: CompareImplItem {
1758
1758
impl_item_def_id : impl_ct_def_id,
1759
1759
trait_item_def_id : trait_ct. def_id ,
1760
1760
kind : impl_ct. kind ,
@@ -1926,7 +1926,7 @@ fn compare_type_predicate_entailment<'tcx>(
1926
1926
let cause = ObligationCause :: new (
1927
1927
span,
1928
1928
impl_ty_def_id,
1929
- ObligationCauseCode :: CompareImplItemObligation {
1929
+ ObligationCauseCode :: CompareImplItem {
1930
1930
impl_item_def_id : impl_ty. def_id . expect_local ( ) ,
1931
1931
trait_item_def_id : trait_ty. def_id ,
1932
1932
kind : impl_ty. kind ,
@@ -2014,9 +2014,9 @@ pub(super) fn check_type_bounds<'tcx>(
2014
2014
) ;
2015
2015
let mk_cause = |span : Span | {
2016
2016
let code = if span. is_dummy ( ) {
2017
- ObligationCauseCode :: ItemObligation ( trait_ty. def_id )
2017
+ ObligationCauseCode :: MiscItem ( trait_ty. def_id )
2018
2018
} else {
2019
- ObligationCauseCode :: BindingObligation ( trait_ty. def_id , span)
2019
+ ObligationCauseCode :: Where ( trait_ty. def_id , span)
2020
2020
} ;
2021
2021
ObligationCause :: new ( impl_ty_span, impl_ty_def_id, code)
2022
2022
} ;
@@ -2253,8 +2253,7 @@ fn try_report_async_mismatch<'tcx>(
2253
2253
} ;
2254
2254
2255
2255
for error in errors {
2256
- if let ObligationCauseCode :: BindingObligation ( def_id, _) =
2257
- * error. root_obligation . cause . code ( )
2256
+ if let ObligationCauseCode :: Where ( def_id, _) = * error. root_obligation . cause . code ( )
2258
2257
&& def_id == async_future_def_id
2259
2258
&& let Some ( proj) = error. root_obligation . predicate . to_opt_poly_projection_pred ( )
2260
2259
&& let Some ( proj) = proj. no_bound_vars ( )
0 commit comments