@@ -126,33 +126,27 @@ where
126126
127127#[ cold]
128128#[ inline( never) ]
129- fn mk_cycle < Q , Qcx > (
130- query : Q ,
131- qcx : Qcx ,
132- cycle_error : CycleError < Qcx :: DepKind > ,
133- handler : HandleCycleError ,
134- ) -> Q :: Value
129+ fn mk_cycle < Q , Qcx > ( query : Q , qcx : Qcx , cycle_error : CycleError < Qcx :: DepKind > ) -> Q :: Value
135130where
136131 Q : QueryConfig < Qcx > ,
137132 Qcx : QueryContext ,
138133{
139134 let error = report_cycle ( qcx. dep_context ( ) . sess ( ) , & cycle_error) ;
140- handle_cycle_error ( query, qcx, & cycle_error, error, handler )
135+ handle_cycle_error ( query, qcx, & cycle_error, error)
141136}
142137
143138fn handle_cycle_error < Q , Qcx > (
144139 query : Q ,
145140 qcx : Qcx ,
146141 cycle_error : & CycleError < Qcx :: DepKind > ,
147142 mut error : DiagnosticBuilder < ' _ , ErrorGuaranteed > ,
148- handler : HandleCycleError ,
149143) -> Q :: Value
150144where
151145 Q : QueryConfig < Qcx > ,
152146 Qcx : QueryContext ,
153147{
154148 use HandleCycleError :: * ;
155- match handler {
149+ match query . handle_cycle_error ( ) {
156150 Error => {
157151 error. emit ( ) ;
158152 query. value_from_cycle_error ( * qcx. dep_context ( ) , & cycle_error. cycle )
@@ -277,7 +271,7 @@ where
277271 & qcx. current_query_job ( ) ,
278272 span,
279273 ) ;
280- ( mk_cycle ( query, qcx, error, query . handle_cycle_error ( ) ) , None )
274+ ( mk_cycle ( query, qcx, error) , None )
281275}
282276
283277#[ inline( always) ]
@@ -314,7 +308,7 @@ where
314308
315309 ( v, Some ( index) )
316310 }
317- Err ( cycle) => ( mk_cycle ( query, qcx, cycle, query . handle_cycle_error ( ) ) , None ) ,
311+ Err ( cycle) => ( mk_cycle ( query, qcx, cycle) , None ) ,
318312 }
319313}
320314
0 commit comments