1
Fork 0

Sanity check computed value for feeable queries.

This commit is contained in:
Camille GILLOT 2022-10-29 13:04:38 +00:00
parent ee7a9a8641
commit 9f2c6b0b09
4 changed files with 42 additions and 3 deletions

View file

@ -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)*]),