about summary refs log tree commit diff
path: root/compiler/rustc_query_impl/src
diff options
context:
space:
mode:
authorCamille GILLOT <gillot.camille@gmail.com>2022-10-29 13:04:38 +0000
committerCamille GILLOT <gillot.camille@gmail.com>2022-11-29 18:42:23 +0000
commit9f2c6b0b09c1f93f922f6fcd46649c3e2110f42b (patch)
tree6a8625ddd4cb0647e5ddb3501dfa7540fc06a98e /compiler/rustc_query_impl/src
parentee7a9a8641b79329ed4c221a2ae0e1e0c3d3d75d (diff)
downloadrust-9f2c6b0b09c1f93f922f6fcd46649c3e2110f42b.tar.gz
rust-9f2c6b0b09c1f93f922f6fcd46649c3e2110f42b.zip
Sanity check computed value for feeable queries.
Diffstat (limited to 'compiler/rustc_query_impl/src')
-rw-r--r--compiler/rustc_query_impl/src/plumbing.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/rustc_query_impl/src/plumbing.rs b/compiler/rustc_query_impl/src/plumbing.rs
index e69f6aa3a93..8d5d84c5db4 100644
--- a/compiler/rustc_query_impl/src/plumbing.rs
+++ b/compiler/rustc_query_impl/src/plumbing.rs
@@ -252,6 +252,18 @@ macro_rules! depth_limit {
     };
 }
 
+macro_rules! feedable {
+    ([]) => {{
+        false
+    }};
+    ([(feedable) $($rest:tt)*]) => {{
+        true
+    }};
+    ([$other:tt $($modifiers:tt)*]) => {
+        feedable!([$($modifiers)*])
+    };
+}
+
 macro_rules! hash_result {
     ([]) => {{
         Some(dep_graph::hash_result)
@@ -491,6 +503,7 @@ macro_rules! define_queries {
                     anon: is_anon!([$($modifiers)*]),
                     eval_always: is_eval_always!([$($modifiers)*]),
                     depth_limit: depth_limit!([$($modifiers)*]),
+                    feedable: feedable!([$($modifiers)*]),
                     dep_kind: dep_graph::DepKind::$name,
                     hash_result: hash_result!([$($modifiers)*]),
                     handle_cycle_error: handle_cycle_error!([$($modifiers)*]),