about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src/assert_dep_graph.rs
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_incremental/src/assert_dep_graph.rs')
-rw-r--r--compiler/rustc_incremental/src/assert_dep_graph.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_incremental/src/assert_dep_graph.rs b/compiler/rustc_incremental/src/assert_dep_graph.rs
index f1f69f1510b..a080b0ce339 100644
--- a/compiler/rustc_incremental/src/assert_dep_graph.rs
+++ b/compiler/rustc_incremental/src/assert_dep_graph.rs
@@ -57,6 +57,10 @@ pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
             dump_graph(tcx);
         }
 
+        if !tcx.sess.opts.debugging_opts.query_dep_graph {
+            return;
+        }
+
         // if the `rustc_attrs` feature is not enabled, then the
         // attributes we are interested in cannot be present anyway, so
         // skip the walk.