about summary refs log tree commit diff
path: root/compiler/rustc_query_system/src/query/job.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_query_system/src/query/job.rs')
-rw-r--r--compiler/rustc_query_system/src/query/job.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_query_system/src/query/job.rs b/compiler/rustc_query_system/src/query/job.rs
index 7e61f5026da..fd1ea997ebe 100644
--- a/compiler/rustc_query_system/src/query/job.rs
+++ b/compiler/rustc_query_system/src/query/job.rs
@@ -289,10 +289,10 @@ where
     F: FnMut(Span, QueryJobId) -> Option<Option<Waiter>>,
 {
     // Visit the parent query which is a non-resumable waiter since it's on the same stack
-    if let Some(parent) = query.parent(query_map) {
-        if let Some(cycle) = visit(query.span(query_map), parent) {
-            return Some(cycle);
-        }
+    if let Some(parent) = query.parent(query_map)
+        && let Some(cycle) = visit(query.span(query_map), parent)
+    {
+        return Some(cycle);
     }
 
     // Visit the explicit waiters which use condvars and are resumable