Sanity check computed value for feeable queries.
This commit is contained in:
parent
ee7a9a8641
commit
9f2c6b0b09
4 changed files with 42 additions and 3 deletions
|
@ -359,6 +359,15 @@ pub fn rustc_queries(input: TokenStream) -> TokenStream {
|
|||
});
|
||||
|
||||
if modifiers.feedable.is_some() {
|
||||
assert!(modifiers.anon.is_none(), "Query {name} cannot be both `feedable` and `anon`.");
|
||||
assert!(
|
||||
modifiers.eval_always.is_none(),
|
||||
"Query {name} cannot be both `feedable` and `eval_always`."
|
||||
);
|
||||
assert!(
|
||||
modifiers.no_hash.is_none(),
|
||||
"Query {name} cannot be both `feedable` and `no_hash`."
|
||||
);
|
||||
feedable_queries.extend(quote! {
|
||||
#(#doc_comments)*
|
||||
[#attribute_stream] fn #name(#arg) #result,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue