]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_query_system/src/dep_graph/dep_node.rs
New upstream version 1.52.0~beta.3+dfsg1
[rustc.git] / compiler / rustc_query_system / src / dep_graph / dep_node.rs
index 64aba870502c77453f7d24881b1edf8099533a65..f55e2f777a26a7be9c7b7a6abd04d2792f1898db 100644 (file)
@@ -79,7 +79,7 @@ impl<K: DepKind> DepNode<K> {
 
     pub fn construct<Ctxt, Key>(tcx: Ctxt, kind: K, arg: &Key) -> DepNode<K>
     where
-        Ctxt: crate::query::QueryContext<DepKind = K>,
+        Ctxt: super::DepContext<DepKind = K>,
         Key: DepNodeParams<Ctxt>,
     {
         let hash = arg.to_fingerprint(tcx);
@@ -87,7 +87,10 @@ impl<K: DepKind> DepNode<K> {
 
         #[cfg(debug_assertions)]
         {
-            if !kind.can_reconstruct_query_key() && tcx.debug_dep_node() {
+            if !kind.can_reconstruct_query_key()
+                && (tcx.sess().opts.debugging_opts.incremental_info
+                    || tcx.sess().opts.debugging_opts.query_dep_graph)
+            {
                 tcx.dep_graph().register_dep_node_debug_str(dep_node, || arg.to_debug_str(tcx));
             }
         }