Add regression test

This commit is contained in:
Jeffrey Seyfried 2016-07-05 00:22:13 +00:00
parent c454c1d4ac
commit bf4911b956
2 changed files with 4 additions and 0 deletions

View File

@ -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| {

View File

@ -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();