File tree 1 file changed +18
-0
lines changed
1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,11 @@ macro_rules! is_input_attr {
90
90
( $attr: ident) => ( false ) ;
91
91
}
92
92
93
+ macro_rules! is_eval_always_attr {
94
+ ( eval_always) => ( true ) ;
95
+ ( $attr: ident) => ( false ) ;
96
+ }
97
+
93
98
macro_rules! contains_anon_attr {
94
99
( $( $attr: ident) ,* ) => ( { $( is_anon_attr!( $attr) | ) * false } ) ;
95
100
}
@@ -98,6 +103,10 @@ macro_rules! contains_input_attr {
98
103
( $( $attr: ident) ,* ) => ( { $( is_input_attr!( $attr) | ) * false } ) ;
99
104
}
100
105
106
+ macro_rules! contains_eval_always_attr {
107
+ ( $( $attr: ident) ,* ) => ( { $( is_eval_always_attr!( $attr) | ) * false } ) ;
108
+ }
109
+
101
110
macro_rules! define_dep_nodes {
102
111
( <$tcx: tt>
103
112
$(
@@ -160,6 +169,15 @@ macro_rules! define_dep_nodes {
160
169
}
161
170
}
162
171
172
+ #[ inline]
173
+ pub fn is_eval_always( & self ) -> bool {
174
+ match * self {
175
+ $(
176
+ DepKind :: $variant => { contains_eval_always_attr!( $( $attr) , * ) }
177
+ ) *
178
+ }
179
+ }
180
+
163
181
#[ allow( unreachable_code) ]
164
182
#[ inline]
165
183
pub fn has_params( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments