about summary refs log tree commit diff
path: root/compiler/rustc_incremental/src/assert_dep_graph.rs
diff options
context:
space:
mode:
authorDylan DPC <dylan.dpc@gmail.com>2021-03-24 01:52:28 +0100
committerGitHub <noreply@github.com>2021-03-24 01:52:28 +0100
commit2f611da1d66ae98b53358bcb7739884524b7e18d (patch)
tree1d50eac4a06f1667e6eb2f16f2a49437802b1880 /compiler/rustc_incremental/src/assert_dep_graph.rs
parentf134ca3864f8c66d6dd01e576ce9b0125eb58210 (diff)
parent31447f6f087e2654d2927f04488303500bec3280 (diff)
downloadrust-2f611da1d66ae98b53358bcb7739884524b7e18d.tar.gz
rust-2f611da1d66ae98b53358bcb7739884524b7e18d.zip
Rollup merge of #83313 - cjgillot:assert, r=michaelwoerister
Only enable assert_dep_graph when query-dep-graph is enabled.

This is a debugging option. The only effect should be on rustc tests.

r? ``@michaelwoerister``
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.