@@ -222,7 +222,7 @@ fn compare_method_predicate_entailment<'tcx>(
222
222
hybrid_preds. predicates . extend (
223
223
trait_m_predicates
224
224
. instantiate_own ( tcx, trait_to_placeholder_args)
225
- . map ( |( predicate, _ ) | predicate) ,
225
+ . map ( |predicate| predicate. node ) ,
226
226
) ;
227
227
228
228
// Construct trait parameter environment and then shift it into the placeholder viewpoint.
@@ -238,7 +238,7 @@ fn compare_method_predicate_entailment<'tcx>(
238
238
debug ! ( "compare_impl_method: caller_bounds={:?}" , param_env. caller_bounds( ) ) ;
239
239
240
240
let impl_m_own_bounds = impl_m_predicates. instantiate_own ( tcx, impl_to_placeholder_args) ;
241
- for ( predicate, span) in impl_m_own_bounds {
241
+ for ty :: Spanned { node : predicate, span } in impl_m_own_bounds {
242
242
let normalize_cause = traits:: ObligationCause :: misc ( span, impl_m_def_id) ;
243
243
let predicate = ocx. normalize ( & normalize_cause, param_env, predicate) ;
244
244
@@ -691,7 +691,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
691
691
. instantiate_identity ( tcx)
692
692
. into_iter ( )
693
693
. chain ( tcx. predicates_of ( trait_m. def_id ) . instantiate_own ( tcx, trait_to_placeholder_args) )
694
- . map ( |( clause, _ ) | clause) ;
694
+ . map ( |clause| clause. node ) ;
695
695
let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses_from_iter ( hybrid_preds) , Reveal :: UserFacing ) ;
696
696
let param_env = traits:: normalize_param_env_or_error (
697
697
tcx,
@@ -1009,7 +1009,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
1009
1009
} ) ;
1010
1010
self . types . insert ( proj. def_id , ( infer_ty, proj. args ) ) ;
1011
1011
// Recurse into bounds
1012
- for ( pred, pred_span) in self
1012
+ for ty :: Spanned { node : pred, span : pred_span } in self
1013
1013
. interner ( )
1014
1014
. explicit_item_bounds ( proj. def_id )
1015
1015
. iter_instantiated_copied ( self . interner ( ) , proj. args )
@@ -1963,7 +1963,7 @@ fn compare_const_predicate_entailment<'tcx>(
1963
1963
hybrid_preds. predicates . extend (
1964
1964
trait_ct_predicates
1965
1965
. instantiate_own ( tcx, trait_to_impl_args)
1966
- . map ( |( predicate, _ ) | predicate) ,
1966
+ . map ( |predicate| predicate. node ) ,
1967
1967
) ;
1968
1968
1969
1969
let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds. predicates ) , Reveal :: UserFacing ) ;
@@ -1977,7 +1977,7 @@ fn compare_const_predicate_entailment<'tcx>(
1977
1977
let ocx = ObligationCtxt :: new ( & infcx) ;
1978
1978
1979
1979
let impl_ct_own_bounds = impl_ct_predicates. instantiate_own ( tcx, impl_args) ;
1980
- for ( predicate, span) in impl_ct_own_bounds {
1980
+ for ty :: Spanned { node : predicate, span } in impl_ct_own_bounds {
1981
1981
let cause = ObligationCause :: misc ( span, impl_ct_def_id) ;
1982
1982
let predicate = ocx. normalize ( & cause, param_env, predicate) ;
1983
1983
@@ -2098,7 +2098,7 @@ fn compare_type_predicate_entailment<'tcx>(
2098
2098
hybrid_preds. predicates . extend (
2099
2099
trait_ty_predicates
2100
2100
. instantiate_own ( tcx, trait_to_impl_args)
2101
- . map ( |( predicate, _ ) | predicate) ,
2101
+ . map ( |predicate| predicate. node ) ,
2102
2102
) ;
2103
2103
2104
2104
debug ! ( "compare_type_predicate_entailment: bounds={:?}" , hybrid_preds) ;
@@ -2112,7 +2112,7 @@ fn compare_type_predicate_entailment<'tcx>(
2112
2112
2113
2113
debug ! ( "compare_type_predicate_entailment: caller_bounds={:?}" , param_env. caller_bounds( ) ) ;
2114
2114
2115
- for ( predicate, span) in impl_ty_own_bounds {
2115
+ for ty :: Spanned { node : predicate, span } in impl_ty_own_bounds {
2116
2116
let cause = ObligationCause :: misc ( span, impl_ty_def_id) ;
2117
2117
let predicate = ocx. normalize ( & cause, param_env, predicate) ;
2118
2118
@@ -2210,9 +2210,14 @@ pub(super) fn check_type_bounds<'tcx>(
2210
2210
let obligations: Vec < _ > = tcx
2211
2211
. explicit_item_bounds ( trait_ty. def_id )
2212
2212
. iter_instantiated_copied ( tcx, rebased_args)
2213
- . map ( |( concrete_ty_bound, span) | {
2214
- debug ! ( "check_type_bounds: concrete_ty_bound = {:?}" , concrete_ty_bound) ;
2215
- traits:: Obligation :: new ( tcx, mk_cause ( span) , param_env, concrete_ty_bound)
2213
+ . map ( |concrete_ty_bound| {
2214
+ debug ! ( "check_type_bounds: concrete_ty_bound = {:?}" , concrete_ty_bound. node) ;
2215
+ traits:: Obligation :: new (
2216
+ tcx,
2217
+ mk_cause ( concrete_ty_bound. span ) ,
2218
+ param_env,
2219
+ concrete_ty_bound. node ,
2220
+ )
2216
2221
} )
2217
2222
. collect ( ) ;
2218
2223
debug ! ( "check_type_bounds: item_bounds={:?}" , obligations) ;
0 commit comments