@@ -222,7 +222,7 @@ fn compare_method_predicate_entailment<'tcx>(
222222 hybrid_preds. predicates . extend (
223223 trait_m_predicates
224224 . instantiate_own ( tcx, trait_to_placeholder_args)
225- . map ( |( predicate, _ ) | predicate) ,
225+ . map ( |predicate| predicate. node ) ,
226226 ) ;
227227
228228 // Construct trait parameter environment and then shift it into the placeholder viewpoint.
@@ -238,7 +238,7 @@ fn compare_method_predicate_entailment<'tcx>(
238238 debug ! ( "compare_impl_method: caller_bounds={:?}" , param_env. caller_bounds( ) ) ;
239239
240240 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 {
242242 let normalize_cause = traits:: ObligationCause :: misc ( span, impl_m_def_id) ;
243243 let predicate = ocx. normalize ( & normalize_cause, param_env, predicate) ;
244244
@@ -691,7 +691,7 @@ pub(super) fn collect_return_position_impl_trait_in_trait_tys<'tcx>(
691691 . instantiate_identity ( tcx)
692692 . into_iter ( )
693693 . chain ( tcx. predicates_of ( trait_m. def_id ) . instantiate_own ( tcx, trait_to_placeholder_args) )
694- . map ( |( clause, _ ) | clause) ;
694+ . map ( |clause| clause. node ) ;
695695 let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses_from_iter ( hybrid_preds) , Reveal :: UserFacing ) ;
696696 let param_env = traits:: normalize_param_env_or_error (
697697 tcx,
@@ -1009,7 +1009,7 @@ impl<'tcx> TypeFolder<TyCtxt<'tcx>> for ImplTraitInTraitCollector<'_, 'tcx> {
10091009 } ) ;
10101010 self . types . insert ( proj. def_id , ( infer_ty, proj. args ) ) ;
10111011 // Recurse into bounds
1012- for ( pred, pred_span) in self
1012+ for ty :: Spanned { node : pred, span : pred_span } in self
10131013 . interner ( )
10141014 . explicit_item_bounds ( proj. def_id )
10151015 . iter_instantiated_copied ( self . interner ( ) , proj. args )
@@ -1963,7 +1963,7 @@ fn compare_const_predicate_entailment<'tcx>(
19631963 hybrid_preds. predicates . extend (
19641964 trait_ct_predicates
19651965 . instantiate_own ( tcx, trait_to_impl_args)
1966- . map ( |( predicate, _ ) | predicate) ,
1966+ . map ( |predicate| predicate. node ) ,
19671967 ) ;
19681968
19691969 let param_env = ty:: ParamEnv :: new ( tcx. mk_clauses ( & hybrid_preds. predicates ) , Reveal :: UserFacing ) ;
@@ -1977,7 +1977,7 @@ fn compare_const_predicate_entailment<'tcx>(
19771977 let ocx = ObligationCtxt :: new ( & infcx) ;
19781978
19791979 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 {
19811981 let cause = ObligationCause :: misc ( span, impl_ct_def_id) ;
19821982 let predicate = ocx. normalize ( & cause, param_env, predicate) ;
19831983
@@ -2098,7 +2098,7 @@ fn compare_type_predicate_entailment<'tcx>(
20982098 hybrid_preds. predicates . extend (
20992099 trait_ty_predicates
21002100 . instantiate_own ( tcx, trait_to_impl_args)
2101- . map ( |( predicate, _ ) | predicate) ,
2101+ . map ( |predicate| predicate. node ) ,
21022102 ) ;
21032103
21042104 debug ! ( "compare_type_predicate_entailment: bounds={:?}" , hybrid_preds) ;
@@ -2112,7 +2112,7 @@ fn compare_type_predicate_entailment<'tcx>(
21122112
21132113 debug ! ( "compare_type_predicate_entailment: caller_bounds={:?}" , param_env. caller_bounds( ) ) ;
21142114
2115- for ( predicate, span) in impl_ty_own_bounds {
2115+ for ty :: Spanned { node : predicate, span } in impl_ty_own_bounds {
21162116 let cause = ObligationCause :: misc ( span, impl_ty_def_id) ;
21172117 let predicate = ocx. normalize ( & cause, param_env, predicate) ;
21182118
@@ -2210,9 +2210,14 @@ pub(super) fn check_type_bounds<'tcx>(
22102210 let obligations: Vec < _ > = tcx
22112211 . explicit_item_bounds ( trait_ty. def_id )
22122212 . 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+ )
22162221 } )
22172222 . collect ( ) ;
22182223 debug ! ( "check_type_bounds: item_bounds={:?}" , obligations) ;
0 commit comments