We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f768697 commit bb3bddfCopy full SHA for bb3bddf
compiler/rustc_expand/src/proc_macro.rs
@@ -149,7 +149,11 @@ impl MultiItemModifier for DeriveProcMacro {
149
150
let res = crate::derive_macro_expansion::enter_context((ecx, self.client), move || {
151
let key = (invoc_id, proc_macro_crate_hash, input);
152
- if tcx.sess.opts.unstable_opts.cache_all_derive_macros {
+ // FIXME(pr-time): Is this the correct way to check for incremental compilation (as
153
+ // well)?
154
+ if tcx.sess.opts.incremental.is_some()
155
+ && tcx.sess.opts.unstable_opts.cache_all_derive_macros
156
+ {
157
tcx.derive_macro_expansion(key).cloned()
158
} else {
159
crate::derive_macro_expansion::provide_derive_macro_expansion(tcx, key).cloned()
0 commit comments