Skip to content

Commit db56376

Browse files
committed
refactor!: Rename cache-all-derive-macros option to cache-proc-macros
1 parent 1cd9a4f commit db56376

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

compiler/rustc_expand/src/proc_macro.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ impl MultiItemModifier for DeriveProcMacro {
152152
// FIXME(pr-time): Is this the correct way to check for incremental compilation (as
153153
// well)?
154154
if tcx.sess.opts.incremental.is_some()
155-
&& tcx.sess.opts.unstable_opts.cache_all_derive_macros
155+
&& tcx.sess.opts.unstable_opts.cache_proc_macros
156156
{
157157
tcx.derive_macro_expansion(key).cloned()
158158
} else {

compiler/rustc_session/src/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2104,8 +2104,8 @@ options! {
21042104
"emit noalias metadata for box (default: yes)"),
21052105
branch_protection: Option<BranchProtection> = (None, parse_branch_protection, [TRACKED],
21062106
"set options for branch target identification and pointer authentication on AArch64"),
2107-
cache_all_derive_macros: bool = (true, parse_bool, [UNTRACKED],
2108-
"cache the results of ALL derive macro invocations (potentially unsound!) (default: YES -- for rustc-perf)"),
2107+
cache_proc_macros: bool = (true, parse_bool, [UNTRACKED],
2108+
"cache the results of ALL proc macro invocations (potentially unsound!) (default: YES -- for rustc-perf)"),
21092109
cf_protection: CFProtection = (CFProtection::None, parse_cfprotection, [TRACKED],
21102110
"instrument control-flow architecture protection"),
21112111
check_cfg_all_expected: bool = (false, parse_bool, [UNTRACKED],

tests/incremental/derive_macro_expansion/proc_macro_unchanged.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
//@ aux-build:derive_nothing.rs
1010
//@ revisions:cfail1 cfail2
11-
//@ compile-flags: -Z query-dep-graph -Zcache-all-derive-macros=true
11+
//@ compile-flags: -Z query-dep-graph -Zcache-proc-macros=true
1212
//@ build-pass
1313

1414
#![feature(rustc_attrs)]
@@ -20,7 +20,7 @@
2020
// #![rustc_partition_codegened(module="proc_macro_unchanged-foo", cfg="cfail2")]
2121

2222
// `foo::nothing_mod` is created by the derive macro and doesn't change
23-
// BUG: this yields the same result with `-Zcache-all-derive-macros=false` (i.e., uncached),
23+
// BUG: this yields the same result with `-Zcache-proc-macros=false` (i.e., uncached),
2424
// not sure how to do this correctly.
2525
#![rustc_partition_reused(module="proc_macro_unchanged-foo-nothing_mod", cfg="cfail2")]
2626

0 commit comments

Comments
 (0)