Skip to content

Commit 35beb09

Browse files
committed
fix: comment + unused warning
1 parent 17dcadf commit 35beb09

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

tests/incremental/derive_macro_expansion/auxiliary/derive_nothing.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ extern crate proc_macro;
77
use proc_macro::TokenStream;
88

99
#[proc_macro_derive(Nothing)]
10-
pub fn derive(input: TokenStream) -> TokenStream {
10+
pub fn derive(_input: TokenStream) -> TokenStream {
1111
eprintln!("invoked");
1212

1313
return r#"

tests/incremental/derive_macro_expansion/proc_macro_unchanged.rs

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
// HOWEVER, this test can currently only be checked manually,
33
// by running it (through compiletest) with `-- --nocapture --verbose`.
44
// 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.
77
// FIXME(pr-time): Properly have the test check this, but how? UI-test that tests for `.stderr`?
88

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

1414
#![feature(rustc_attrs)]
@@ -17,10 +17,12 @@
1717
#![crate_type = "rlib"]
1818

1919
#![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")]
2121

2222
// `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")]
2426

2527
#[macro_use]
2628
extern crate derive_nothing;

0 commit comments

Comments
 (0)