From 30cda580bd9df4085fa3f8a04d4c68e7bfa1b95c Mon Sep 17 00:00:00 2001 From: topecongiro Date: Thu, 20 Dec 2018 01:13:18 +0900 Subject: [PATCH] Add a test for #3004 --- tests/source/macros.rs | 5 +++++ tests/target/macros.rs | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/tests/source/macros.rs b/tests/source/macros.rs index 07934255bacd..29d8f0661268 100644 --- a/tests/source/macros.rs +++ b/tests/source/macros.rs @@ -466,3 +466,8 @@ static ROOTED_TRACEABLES: RefCell = RefCell::new(RootedTraceableSet::new(1234)) ; ] ; + +fn issue3004() { + foo!(|_| { ( ) }); + stringify!(( foo+ )); +} diff --git a/tests/target/macros.rs b/tests/target/macros.rs index 061d1746422b..bc15a86cf349 100644 --- a/tests/target/macros.rs +++ b/tests/target/macros.rs @@ -1043,3 +1043,8 @@ thread_local![ static ROOTED_TRACEABLES: RefCell = RefCell::new(RootedTraceableSet::new(1234)); ]; + +fn issue3004() { + foo!(|_| { () }); + stringify!((foo+)); +}