From 85b206a32c221d6d0e44222ed3849de6b49f8f5c Mon Sep 17 00:00:00 2001 From: rchaser53 Date: Fri, 22 Mar 2019 18:20:00 +0900 Subject: [PATCH] add test for visitor mad from same context --- tests/source/issue-3434/lib.rs | 21 +++++++++++++++++++++ tests/target/issue-3434/lib.rs | 21 +++++++++++++++++++++ 2 files changed, 42 insertions(+) diff --git a/tests/source/issue-3434/lib.rs b/tests/source/issue-3434/lib.rs index d3f4056bd8a..7e396b38388 100644 --- a/tests/source/issue-3434/lib.rs +++ b/tests/source/issue-3434/lib.rs @@ -34,3 +34,24 @@ this should be skipped } .to_string(); } + +fn visitor_made_from_same_context() { + let pair = ( + || { + foo!(
+this should be mangled
+ ); + skip_macro_mod!(
+this should be skipped
+ ); + }, + || { + foo!(
+this should be mangled
+ ); + skip_macro_mod!(
+this should be skipped
+ ); + }, + ); +} diff --git a/tests/target/issue-3434/lib.rs b/tests/target/issue-3434/lib.rs index 95bc75642f0..2fd7aea21c7 100644 --- a/tests/target/issue-3434/lib.rs +++ b/tests/target/issue-3434/lib.rs @@ -34,3 +34,24 @@ this should be skipped } .to_string(); } + +fn visitor_made_from_same_context() { + let pair = ( + || { + foo!(
+ this should be mangled
+ ); + skip_macro_mod!(
+this should be skipped
+ ); + }, + || { + foo!(
+ this should be mangled
+ ); + skip_macro_mod!(
+this should be skipped
+ ); + }, + ); +}