@@ -27,7 +27,7 @@ use rustc_query_system::query::{
27
27
QueryCache , QueryConfig , QueryContext , QueryJobId , QueryMap , QuerySideEffects , QueryStackFrame ,
28
28
force_query,
29
29
} ;
30
- use rustc_query_system:: { LayoutOfDepth , QueryOverflow } ;
30
+ use rustc_query_system:: { QueryOverflow , QueryOverflowNote } ;
31
31
use rustc_serialize:: { Decodable , Encodable } ;
32
32
use rustc_session:: Limit ;
33
33
use rustc_span:: def_id:: LOCAL_CRATE ;
@@ -154,12 +154,10 @@ impl QueryContext for QueryCtxt<'_> {
154
154
155
155
fn depth_limit_error ( self , job : QueryJobId ) {
156
156
let mut span = None ;
157
- let mut layout_of_depth = None ;
158
- if let Some ( ( info, depth) ) =
159
- job. try_find_layout_root ( self . collect_active_jobs ( ) , dep_kinds:: layout_of)
160
- {
157
+ let mut note = None ;
158
+ if let Some ( ( info, depth) ) = job. try_find_dep_kind_root ( self . collect_active_jobs ( ) ) {
161
159
span = Some ( info. job . span ) ;
162
- layout_of_depth = Some ( LayoutOfDepth { desc : info. query . description , depth } ) ;
160
+ note = Some ( QueryOverflowNote { desc : info. query . description , depth } ) ;
163
161
}
164
162
165
163
let suggested_limit = match self . recursion_limit ( ) {
@@ -169,7 +167,7 @@ impl QueryContext for QueryCtxt<'_> {
169
167
170
168
self . sess . dcx ( ) . emit_fatal ( QueryOverflow {
171
169
span,
172
- layout_of_depth ,
170
+ note ,
173
171
suggested_limit,
174
172
crate_name : self . crate_name ( LOCAL_CRATE ) ,
175
173
} ) ;
0 commit comments