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+)); +}