Skip to content

Commit 219603a

Browse files
committed
Only enable assert_dep_graph when query-dep-graph is enabled.
1 parent d04c3aa commit 219603a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

compiler/rustc_incremental/src/assert_dep_graph.rs

+4
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,10 @@ pub fn assert_dep_graph(tcx: TyCtxt<'_>) {
5757
dump_graph(tcx);
5858
}
5959

60+
if !tcx.sess.opts.debugging_opts.query_dep_graph {
61+
return;
62+
}
63+
6064
// if the `rustc_attrs` feature is not enabled, then the
6165
// attributes we are interested in cannot be present anyway, so
6266
// skip the walk.

compiler/rustc_incremental/src/persist/dirty_clean.rs

+4
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,10 @@ impl Assertion {
148148
}
149149

150150
pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
151+
if !tcx.sess.opts.debugging_opts.query_dep_graph {
152+
return;
153+
}
154+
151155
// can't add `#[rustc_dirty]` etc without opting in to this feature
152156
if !tcx.features().rustc_attrs {
153157
return;

0 commit comments

Comments
 (0)