Skip to content

Commit bf4911b

Browse files
committed
Add regression test
1 parent c454c1d commit bf4911b

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs

+1
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ fn expand_into_foo_multi(cx: &mut ExtCtxt,
7272
..(*quote_item!(cx, enum Foo2 { Bar2, Baz2 }).unwrap()).clone()
7373
})),
7474
Annotatable::Item(quote_item!(cx, enum Foo3 { Bar }).unwrap()),
75+
Annotatable::Item(quote_item!(cx, #[cfg(any())] fn foo2() {}).unwrap()),
7576
],
7677
Annotatable::ImplItem(it) => vec![
7778
quote_item!(cx, impl X { fn foo(&self) -> i32 { 42 } }).unwrap().and_then(|i| {

src/test/run-pass-fulldeps/macro-crate.rs

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ extern crate macro_crate_test;
2121
#[derive(PartialEq, Clone, Debug)]
2222
fn foo() -> AnotherFakeTypeThatHadBetterGoAway {}
2323

24+
// Check that the `#[into_multi_foo]`-generated `foo2` is configured away
25+
fn foo2() {}
26+
2427
trait Qux {
2528
#[into_multi_foo]
2629
fn bar();

0 commit comments

Comments
 (0)