@@ -19,12 +19,13 @@ use rustc_span::{DUMMY_SP, Span};
1919use tracing:: instrument;
2020
2121use super :: QueryConfig ;
22- use crate :: HandleCycleError ;
2322use crate :: dep_graph:: { DepContext , DepGraphData , DepNode , DepNodeIndex , DepNodeParams } ;
2423use crate :: ich:: StableHashingContext ;
2524use crate :: query:: caches:: QueryCache ;
2625use crate :: query:: job:: { QueryInfo , QueryJob , QueryJobId , QueryJobInfo , QueryLatch , report_cycle} ;
27- use crate :: query:: { QueryContext , QueryMap , QueryStackFrame , SerializedDepNodeIndex } ;
26+ use crate :: query:: {
27+ CycleErrorHandling , QueryContext , QueryMap , QueryStackFrame , SerializedDepNodeIndex ,
28+ } ;
2829
2930#[ inline]
3031fn equivalent_key < K : Eq , V > ( k : & K ) -> impl Fn ( & ( K , V ) ) -> bool + ' _ {
@@ -142,22 +143,21 @@ where
142143 Q : QueryConfig < Qcx > ,
143144 Qcx : QueryContext ,
144145{
145- use HandleCycleError :: * ;
146- match query. handle_cycle_error ( ) {
147- Error => {
146+ match query. cycle_error_handling ( ) {
147+ CycleErrorHandling :: Error => {
148148 let guar = error. emit ( ) ;
149149 query. value_from_cycle_error ( * qcx. dep_context ( ) , cycle_error, guar)
150150 }
151- Fatal => {
151+ CycleErrorHandling :: Fatal => {
152152 error. emit ( ) ;
153153 qcx. dep_context ( ) . sess ( ) . dcx ( ) . abort_if_errors ( ) ;
154154 unreachable ! ( )
155155 }
156- DelayBug => {
156+ CycleErrorHandling :: DelayBug => {
157157 let guar = error. delay_as_bug ( ) ;
158158 query. value_from_cycle_error ( * qcx. dep_context ( ) , cycle_error, guar)
159159 }
160- Stash => {
160+ CycleErrorHandling :: Stash => {
161161 let guar = if let Some ( root) = cycle_error. cycle . first ( )
162162 && let Some ( span) = root. query . span
163163 {
0 commit comments