提交 219603a9 编写于 作者: C Camille GILLOT

Only enable assert_dep_graph when query-dep-graph is enabled.

上级 d04c3aa8
......@@ -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 @@ fn from_dirty_labels(labels: Labels) -> 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册