|
2 | 2 | // HOWEVER, this test can currently only be checked manually,
|
3 | 3 | // by running it (through compiletest) with `-- --nocapture --verbose`.
|
4 | 4 | // The proc-macro (for `Nothing`) prints a message to stderr when invoked,
|
5 |
| -// and this message should only be present during the second invocation |
6 |
| -// (which has `cfail2` set via cfg). |
| 5 | +// and this message should only be present during the first invocation, |
| 6 | +// because the cached result should be used for the second invocation. |
7 | 7 | // FIXME(pr-time): Properly have the test check this, but how? UI-test that tests for `.stderr`?
|
8 | 8 |
|
9 | 9 | //@ aux-build:derive_nothing.rs
|
10 | 10 | //@ revisions:cfail1 cfail2
|
11 |
| -//@ compile-flags: -Z query-dep-graph |
| 11 | +//@ compile-flags: -Z query-dep-graph -Zcache-all-derive-macros=true |
12 | 12 | //@ build-pass
|
13 | 13 |
|
14 | 14 | #![feature(rustc_attrs)]
|
|
17 | 17 | #![crate_type = "rlib"]
|
18 | 18 |
|
19 | 19 | #![rustc_partition_codegened(module="proc_macro_unchanged-foo", cfg="cfail1")]
|
20 |
| -#![rustc_partition_codegened(module="proc_macro_unchanged-foo", cfg="cfail2")] |
| 20 | +// #![rustc_partition_codegened(module="proc_macro_unchanged-foo", cfg="cfail2")] |
21 | 21 |
|
22 | 22 | // `foo::nothing_mod` is created by the derive macro and doesn't change
|
23 |
| -#![rustc_partition_reused(module="proc_macro_unchanged-foo", cfg="cfail2")] |
| 23 | +// BUG: this yields the same result with `-Zcache-all-derive-macros=false` (i.e., uncached), |
| 24 | +// not sure how to do this correctly. |
| 25 | +#![rustc_partition_reused(module="proc_macro_unchanged-foo-nothing_mod", cfg="cfail2")] |
24 | 26 |
|
25 | 27 | #[macro_use]
|
26 | 28 | extern crate derive_nothing;
|
|
0 commit comments