Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 85b206a

Browse files
committed
add test for visitor mad from same context
1 parent 1d9104b commit 85b206a

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

tests/source/issue-3434/lib.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,24 @@ this should be skipped</div>
3434
}
3535
.to_string();
3636
}
37+
38+
fn visitor_made_from_same_context() {
39+
let pair = (
40+
|| {
41+
foo!(<div>
42+
this should be mangled</div>
43+
);
44+
skip_macro_mod!(<div>
45+
this should be skipped</div>
46+
);
47+
},
48+
|| {
49+
foo!(<div>
50+
this should be mangled</div>
51+
);
52+
skip_macro_mod!(<div>
53+
this should be skipped</div>
54+
);
55+
},
56+
);
57+
}

tests/target/issue-3434/lib.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,24 @@ this should be skipped</div>
3434
}
3535
.to_string();
3636
}
37+
38+
fn visitor_made_from_same_context() {
39+
let pair = (
40+
|| {
41+
foo!(<div>
42+
this should be mangled</div>
43+
);
44+
skip_macro_mod!(<div>
45+
this should be skipped</div>
46+
);
47+
},
48+
|| {
49+
foo!(<div>
50+
this should be mangled</div>
51+
);
52+
skip_macro_mod!(<div>
53+
this should be skipped</div>
54+
);
55+
},
56+
);
57+
}

0 commit comments

Comments
 (0)