mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 06:44:35 +00:00
Only enable assert_dep_graph when query-dep-graph is enabled.
This commit is contained in:
parent
d04c3aa865
commit
219603a958
@ -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.
|
||||
|
@ -148,6 +148,10 @@ impl Assertion {
|
||||
}
|
||||
|
||||
pub fn check_dirty_clean_annotations(tcx: TyCtxt<'_>) {
|
||||
if !tcx.sess.opts.debugging_opts.query_dep_graph {
|
||||
return;
|
||||
}
|
||||
|
||||
// can't add `#[rustc_dirty]` etc without opting in to this feature
|
||||
if !tcx.features().rustc_attrs {
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user