Skip to content

Commit bfbfe63

Browse files
committed
skip assert-dep-graph unless unit testing
this can actually be expensive!
1 parent 54595ec commit bfbfe63

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/librustc_incremental/assert_dep_graph.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ pub fn assert_dep_graph<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
7171
dump_graph(tcx);
7272
}
7373

74+
// if the `rustc_attrs` feature is not enabled, then the
75+
// attributes we are interested in cannot be present anyway, so
76+
// skip the walk.
77+
if !tcx.sess.features.borrow().rustc_attrs {
78+
return;
79+
}
80+
7481
// Find annotations supplied by user (if any).
7582
let (if_this_changed, then_this_would_need) = {
7683
let mut visitor = IfThisChanged { tcx: tcx,

0 commit comments

Comments
 (0)