File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 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 {
9090 ( $attr: ident) => ( false ) ;
9191}
9292
93+ macro_rules! is_eval_always_attr {
94+ ( eval_always) => ( true ) ;
95+ ( $attr: ident) => ( false ) ;
96+ }
97+
9398macro_rules! contains_anon_attr {
9499 ( $( $attr: ident) ,* ) => ( { $( is_anon_attr!( $attr) | ) * false } ) ;
95100}
@@ -98,6 +103,10 @@ macro_rules! contains_input_attr {
98103 ( $( $attr: ident) ,* ) => ( { $( is_input_attr!( $attr) | ) * false } ) ;
99104}
100105
106+ macro_rules! contains_eval_always_attr {
107+ ( $( $attr: ident) ,* ) => ( { $( is_eval_always_attr!( $attr) | ) * false } ) ;
108+ }
109+
101110macro_rules! define_dep_nodes {
102111 ( <$tcx: tt>
103112 $(
@@ -160,6 +169,15 @@ macro_rules! define_dep_nodes {
160169 }
161170 }
162171
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+
163181 #[ allow( unreachable_code) ]
164182 #[ inline]
165183 pub fn has_params( & self ) -> bool {
You can’t perform that action at this time.
0 commit comments