diff --git a/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs index 11d81eda55625..3f50811f826e0 100644 --- a/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs +++ b/src/test/run-pass-fulldeps/auxiliary/macro_crate_test.rs @@ -72,6 +72,7 @@ fn expand_into_foo_multi(cx: &mut ExtCtxt, ..(*quote_item!(cx, enum Foo2 { Bar2, Baz2 }).unwrap()).clone() })), Annotatable::Item(quote_item!(cx, enum Foo3 { Bar }).unwrap()), + Annotatable::Item(quote_item!(cx, #[cfg(any())] fn foo2() {}).unwrap()), ], Annotatable::ImplItem(it) => vec![ quote_item!(cx, impl X { fn foo(&self) -> i32 { 42 } }).unwrap().and_then(|i| { diff --git a/src/test/run-pass-fulldeps/macro-crate.rs b/src/test/run-pass-fulldeps/macro-crate.rs index d17adff007c63..fe2317aabea68 100644 --- a/src/test/run-pass-fulldeps/macro-crate.rs +++ b/src/test/run-pass-fulldeps/macro-crate.rs @@ -21,6 +21,9 @@ extern crate macro_crate_test; #[derive(PartialEq, Clone, Debug)] fn foo() -> AnotherFakeTypeThatHadBetterGoAway {} +// Check that the `#[into_multi_foo]`-generated `foo2` is configured away +fn foo2() {} + trait Qux { #[into_multi_foo] fn bar();