turbo_tasks_macros/
lib.rs1#![allow(internal_features)]
2#![feature(proc_macro_diagnostic)]
3#![feature(allow_internal_unstable)]
4#![feature(box_patterns)]
5
6mod assert_fields;
7mod derive;
8mod func;
9mod function_macro;
10mod global_name;
11mod primitive_macro;
12mod value_impl_macro;
13mod value_macro;
14mod value_trait_macro;
15
16mod expand;
17mod ident;
18mod primitive_input;
19mod self_filter;
20mod value_trait_arguments;
21
22use proc_macro::TokenStream;
23use proc_macro_error::proc_macro_error;
24
25#[proc_macro_derive(TraceRawVcs, attributes(turbo_tasks))]
26pub fn derive_trace_raw_vcs_attr(input: TokenStream) -> TokenStream {
27 derive::derive_trace_raw_vcs(input)
28}
29
30#[proc_macro_derive(NonLocalValue, attributes(turbo_tasks))]
31pub fn derive_non_local_value_attr(input: TokenStream) -> TokenStream {
32 derive::derive_non_local_value(input)
33}
34
35#[proc_macro_derive(OperationValue, attributes(turbo_tasks))]
36pub fn derive_operation_value_attr(input: TokenStream) -> TokenStream {
37 derive::derive_operation_value(input)
38}
39
40#[proc_macro_derive(ValueDebug, attributes(turbo_tasks))]
41pub fn derive_value_debug_attr(input: TokenStream) -> TokenStream {
42 derive::derive_value_debug(input)
43}
44
45#[proc_macro_derive(ValueDebugFormat, attributes(turbo_tasks))]
46pub fn derive_value_debug_format_attr(input: TokenStream) -> TokenStream {
47 derive::derive_value_debug_format(input)
48}
49
50#[proc_macro_derive(DeterministicHash, attributes(turbo_tasks))]
51pub fn derive_deterministic_hash(input: TokenStream) -> TokenStream {
52 derive::derive_deterministic_hash(input)
53}
54
55#[proc_macro_derive(TaskInput, attributes(turbo_tasks))]
56pub fn derive_task_input(input: TokenStream) -> TokenStream {
57 derive::derive_task_input(input)
58}
59
60#[proc_macro_derive(ValueToString, attributes(value_to_string))]
61pub fn derive_value_to_string(input: TokenStream) -> TokenStream {
62 derive::value_to_string_macro::derive_value_to_string(input)
63}
64
65#[proc_macro_attribute]
70pub fn task_storage(_args: TokenStream, input: TokenStream) -> TokenStream {
71 derive::task_storage(input)
72}
73
74#[allow_internal_unstable(min_specialization, into_future, trivial_bounds)]
79#[proc_macro_error]
80#[proc_macro_attribute]
81pub fn value(args: TokenStream, input: TokenStream) -> TokenStream {
82 value_macro::value(args, input)
83}
84
85#[allow_internal_unstable(min_specialization, into_future, trivial_bounds)]
90#[proc_macro_error]
91#[proc_macro_attribute]
92pub fn value_trait(args: TokenStream, input: TokenStream) -> TokenStream {
93 value_trait_macro::value_trait(args, input)
94}
95
96#[allow_internal_unstable(min_specialization, into_future, trivial_bounds)]
97#[proc_macro_error]
98#[proc_macro_attribute]
99pub fn function(args: TokenStream, input: TokenStream) -> TokenStream {
100 function_macro::function(args, input)
101}
102
103#[allow_internal_unstable(min_specialization, into_future, trivial_bounds)]
104#[proc_macro_error]
105#[proc_macro_attribute]
106pub fn test_tt(_args: TokenStream, input: TokenStream) -> TokenStream {
107 derive::derive_value_debug(input)
108}
109
110#[allow_internal_unstable(min_specialization, into_future, trivial_bounds)]
111#[proc_macro_error]
112#[proc_macro_attribute]
113pub fn value_impl(args: TokenStream, input: TokenStream) -> TokenStream {
114 value_impl_macro::value_impl(args, input)
115}
116
117#[allow_internal_unstable(min_specialization, into_future, trivial_bounds)]
118#[proc_macro_error]
119#[proc_macro]
120pub fn primitive(input: TokenStream) -> TokenStream {
121 primitive_macro::primitive(input)
122}