@@ -80,14 +80,14 @@ impl QueryContext for QueryCtxt<'_> {
8080 tls:: with_related_context ( self . tcx , |icx| icx. query )
8181 }
8282
83- fn try_collect_active_jobs ( self ) -> Option < QueryMap > {
83+ fn collect_active_jobs ( self ) -> QueryMap {
8484 let mut jobs = QueryMap :: default ( ) ;
8585
8686 for collect in super :: TRY_COLLECT_ACTIVE_JOBS . iter ( ) {
8787 collect ( self . tcx , & mut jobs) ;
8888 }
8989
90- Some ( jobs)
90+ jobs
9191 }
9292
9393 // Interactions with on_disk_cache
@@ -155,11 +155,11 @@ impl QueryContext for QueryCtxt<'_> {
155155 fn depth_limit_error ( self , job : QueryJobId ) {
156156 let mut span = None ;
157157 let mut layout_of_depth = None ;
158- if let Some ( map ) = self . try_collect_active_jobs ( ) {
159- if let Some ( ( info , depth ) ) = job. try_find_layout_root ( map , dep_kinds:: layout_of) {
160- span = Some ( info . job . span ) ;
161- layout_of_depth = Some ( LayoutOfDepth { desc : info. query . description , depth } ) ;
162- }
158+ if let Some ( ( info , depth ) ) =
159+ job. try_find_layout_root ( self . collect_active_jobs ( ) , dep_kinds:: layout_of)
160+ {
161+ span = Some ( info. job . span ) ;
162+ layout_of_depth = Some ( LayoutOfDepth { desc : info . query . description , depth } ) ;
163163 }
164164
165165 let suggested_limit = match self . recursion_limit ( ) {
0 commit comments