skip assert-dep-graph unless unit testing
this can actually be expensive!
This commit is contained in:
parent
54595ecb60
commit
bfbfe639b1
1 changed files with 7 additions and 0 deletions
|
|
@ -71,6 +71,13 @@ pub fn assert_dep_graph<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>) {
|
|||
dump_graph(tcx);
|
||||
}
|
||||
|
||||
// if the `rustc_attrs` feature is not enabled, then the
|
||||
// attributes we are interested in cannot be present anyway, so
|
||||
// skip the walk.
|
||||
if !tcx.sess.features.borrow().rustc_attrs {
|
||||
return;
|
||||
}
|
||||
|
||||
// Find annotations supplied by user (if any).
|
||||
let (if_this_changed, then_this_would_need) = {
|
||||
let mut visitor = IfThisChanged { tcx: tcx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue