@@ -2051,7 +2051,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
20512051 "assemble_unboxed_candidates: kind={:?} obligation={:?}" ,
20522052 kind, obligation
20532053 ) ;
2054- match self . infcx . closure_kind ( closure_def_id, closure_substs) {
2054+ match self . infcx . closure_kind ( closure_def_id,
2055+ ty:: ClosureSubsts :: from_ref ( closure_substs) ) {
20552056 Some ( closure_kind) => {
20562057 debug ! (
20572058 "assemble_unboxed_candidates: closure_kind = {:?}" ,
@@ -3375,7 +3376,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
33753376 obligations. push ( Obligation :: new (
33763377 obligation. cause . clone ( ) ,
33773378 obligation. param_env ,
3378- ty:: Predicate :: ClosureKind ( closure_def_id, ty:: ClosureSubsts :: from_ref ( substs. clone ( ) ) , kind) ,
3379+ ty:: Predicate :: ClosureKind ( closure_def_id,
3380+ ty:: ClosureSubsts :: from_ref ( substs. clone ( ) ) , kind) ,
33793381 ) ) ;
33803382 }
33813383
@@ -3876,7 +3878,8 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
38763878 "closure_trait_ref_unnormalized(obligation={:?}, closure_def_id={:?}, substs={:?})" ,
38773879 obligation, closure_def_id, substs,
38783880 ) ;
3879- let closure_type = self . infcx . closure_sig ( closure_def_id, substs) ;
3881+ let closure_type = self . infcx . closure_sig ( closure_def_id,
3882+ ty:: ClosureSubsts :: from_ref ( substs) ) ;
38803883
38813884 debug ! (
38823885 "closure_trait_ref_unnormalized: closure_type = {:?}" ,
0 commit comments