about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWesley Wiser <wwiser@gmail.com>2017-10-23 18:10:29 -0400
committerWesley Wiser <wwiser@gmail.com>2017-10-26 18:47:46 -0400
commitc1436c3aa52c25fdbaa174bfe28df318d3ce879d (patch)
treec5a83e2b56f5f53873721b6ad73e623e9e8d39f1
parent9d72fc67a414a023278511d7eadfb1228d334249 (diff)
downloadrust-c1436c3aa52c25fdbaa174bfe28df318d3ce879d.tar.gz
rust-c1436c3aa52c25fdbaa174bfe28df318d3ce879d.zip
Handle eval_always queries in force()
Part of #45238
-rw-r--r--src/librustc/ty/maps/plumbing.rs15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/librustc/ty/maps/plumbing.rs b/src/librustc/ty/maps/plumbing.rs
index 5f93c3de336..e8f1ee10d6d 100644
--- a/src/librustc/ty/maps/plumbing.rs
+++ b/src/librustc/ty/maps/plumbing.rs
@@ -433,10 +433,17 @@ macro_rules! define_maps {
                 profq_msg!(tcx, ProfileQueriesMsg::ProviderBegin);
                 let res = tcx.cycle_check(span, Query::$name(key), || {
                     tcx.sess.diagnostic().track_diagnostics(|| {
-                        tcx.dep_graph.with_task(dep_node,
-                                                tcx,
-                                                key,
-                                                Self::compute_result)
+                        if dep_node.kind.is_eval_always() {
+                            tcx.dep_graph.with_eval_always_task(dep_node,
+                                                                tcx,
+                                                                key,
+                                                                Self::compute_result)
+                        } else {
+                            tcx.dep_graph.with_task(dep_node,
+                                                    tcx,
+                                                    key,
+                                                    Self::compute_result)
+                        }
                     })
                 })?;
                 profq_msg!(tcx, ProfileQueriesMsg::ProviderEnd);