@@ -126,33 +126,27 @@ where
126
126
127
127
#[ cold]
128
128
#[ 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
135
130
where
136
131
Q : QueryConfig < Qcx > ,
137
132
Qcx : QueryContext ,
138
133
{
139
134
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)
141
136
}
142
137
143
138
fn handle_cycle_error < Q , Qcx > (
144
139
query : Q ,
145
140
qcx : Qcx ,
146
141
cycle_error : & CycleError < Qcx :: DepKind > ,
147
142
mut error : DiagnosticBuilder < ' _ , ErrorGuaranteed > ,
148
- handler : HandleCycleError ,
149
143
) -> Q :: Value
150
144
where
151
145
Q : QueryConfig < Qcx > ,
152
146
Qcx : QueryContext ,
153
147
{
154
148
use HandleCycleError :: * ;
155
- match handler {
149
+ match query . handle_cycle_error ( ) {
156
150
Error => {
157
151
error. emit ( ) ;
158
152
query. value_from_cycle_error ( * qcx. dep_context ( ) , & cycle_error. cycle )
@@ -277,7 +271,7 @@ where
277
271
& qcx. current_query_job ( ) ,
278
272
span,
279
273
) ;
280
- ( mk_cycle ( query, qcx, error, query . handle_cycle_error ( ) ) , None )
274
+ ( mk_cycle ( query, qcx, error) , None )
281
275
}
282
276
283
277
#[ inline( always) ]
@@ -314,7 +308,7 @@ where
314
308
315
309
( v, Some ( index) )
316
310
}
317
- Err ( cycle) => ( mk_cycle ( query, qcx, cycle, query . handle_cycle_error ( ) ) , None ) ,
311
+ Err ( cycle) => ( mk_cycle ( query, qcx, cycle) , None ) ,
318
312
}
319
313
}
320
314
0 commit comments