File tree Expand file tree Collapse file tree 2 files changed +19
-21
lines changed
compiler/rustc_next_trait_solver/src/solve Expand file tree Collapse file tree 2 files changed +19
-21
lines changed Original file line number Diff line number Diff line change @@ -452,22 +452,21 @@ where
452
452
}
453
453
} ;
454
454
455
+ let ( inputs, output) = ecx. instantiate_binder_with_infer ( tupled_inputs_and_output) ;
455
456
// A built-in `Fn` impl only holds if the output is sized.
456
457
// (FIXME: technically we only need to check this if the type is a fn ptr...)
457
- let output_is_sized_pred = tupled_inputs_and_output. map_bound ( |( _, output) | {
458
- ty:: TraitRef :: new ( cx, cx. require_trait_lang_item ( SolverTraitLangItem :: Sized ) , [ output] )
459
- } ) ;
458
+ let output_is_sized_pred =
459
+ ty:: TraitRef :: new ( cx, cx. require_trait_lang_item ( SolverTraitLangItem :: Sized ) , [ output] ) ;
460
460
461
- let pred = tupled_inputs_and_output
462
- . map_bound ( |( inputs, output) | ty:: ProjectionPredicate {
463
- projection_term : ty:: AliasTerm :: new (
464
- cx,
465
- goal. predicate . def_id ( ) ,
466
- [ goal. predicate . self_ty ( ) , inputs] ,
467
- ) ,
468
- term : output. into ( ) ,
469
- } )
470
- . upcast ( cx) ;
461
+ let pred = ty:: ProjectionPredicate {
462
+ projection_term : ty:: AliasTerm :: new (
463
+ cx,
464
+ goal. predicate . def_id ( ) ,
465
+ [ goal. predicate . self_ty ( ) , inputs] ,
466
+ ) ,
467
+ term : output. into ( ) ,
468
+ }
469
+ . upcast ( cx) ;
471
470
472
471
Self :: probe_and_consider_implied_clause (
473
472
ecx,
Original file line number Diff line number Diff line change @@ -370,17 +370,16 @@ where
370
370
}
371
371
} ;
372
372
373
+ let ( inputs, output) = ecx. instantiate_binder_with_infer ( tupled_inputs_and_output) ;
374
+
373
375
// A built-in `Fn` impl only holds if the output is sized.
374
376
// (FIXME: technically we only need to check this if the type is a fn ptr...)
375
- let output_is_sized_pred = tupled_inputs_and_output. map_bound ( |( _, output) | {
376
- ty:: TraitRef :: new ( cx, cx. require_trait_lang_item ( SolverTraitLangItem :: Sized ) , [ output] )
377
- } ) ;
377
+ let output_is_sized_pred =
378
+ ty:: TraitRef :: new ( cx, cx. require_trait_lang_item ( SolverTraitLangItem :: Sized ) , [ output] ) ;
378
379
379
- let pred = tupled_inputs_and_output
380
- . map_bound ( |( inputs, _) | {
381
- ty:: TraitRef :: new ( cx, goal. predicate . def_id ( ) , [ goal. predicate . self_ty ( ) , inputs] )
382
- } )
383
- . upcast ( cx) ;
380
+ let pred =
381
+ ty:: TraitRef :: new ( cx, goal. predicate . def_id ( ) , [ goal. predicate . self_ty ( ) , inputs] )
382
+ . upcast ( cx) ;
384
383
Self :: probe_and_consider_implied_clause (
385
384
ecx,
386
385
CandidateSource :: BuiltinImpl ( BuiltinImplSource :: Misc ) ,
You can’t perform that action at this time.
0 commit comments