@@ -27,7 +27,7 @@ use rustc_query_system::query::{
2727 QueryCache , QueryConfig , QueryContext , QueryJobId , QueryMap , QuerySideEffects , QueryStackFrame ,
2828 force_query,
2929} ;
30- use rustc_query_system:: { LayoutOfDepth , QueryOverflow } ;
30+ use rustc_query_system:: { QueryOverflow , QueryOverflowNote } ;
3131use rustc_serialize:: { Decodable , Encodable } ;
3232use rustc_session:: Limit ;
3333use rustc_span:: def_id:: LOCAL_CRATE ;
@@ -154,12 +154,10 @@ impl QueryContext for QueryCtxt<'_> {
154154
155155 fn depth_limit_error ( self , job : QueryJobId ) {
156156 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 ( ) ) {
161159 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 } ) ;
163161 }
164162
165163 let suggested_limit = match self . recursion_limit ( ) {
@@ -169,7 +167,7 @@ impl QueryContext for QueryCtxt<'_> {
169167
170168 self . sess . dcx ( ) . emit_fatal ( QueryOverflow {
171169 span,
172- layout_of_depth ,
170+ note ,
173171 suggested_limit,
174172 crate_name : self . crate_name ( LOCAL_CRATE ) ,
175173 } ) ;
0 commit comments