aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/tests.rs
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-20 06:33:19 +0000
committerGitHub <[email protected]>2020-12-20 06:33:19 +0000
commit87886e89867d36c14812e70505c4db61a6b66bf0 (patch)
treefe3bb04239ea3cc274f795246daa9c1851bb9032 /crates/mbe/src/tests.rs
parent02fb3cb542c676ffcd627d5ac5092aa3a5d71d30 (diff)
parent75a26f64ff8aa4fcacd849b2b3cde8f688baa789 (diff)
Merge #6929
6929: Handle $_ in mbe r=edwin0cheng a=lnicola Fixes #6926 Co-authored-by: LaurenČ›iu Nicola <[email protected]>
Diffstat (limited to 'crates/mbe/src/tests.rs')
-rw-r--r--crates/mbe/src/tests.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs
index dff6e98c2..f10e7a9b6 100644
--- a/crates/mbe/src/tests.rs
+++ b/crates/mbe/src/tests.rs
@@ -992,6 +992,18 @@ fn test_tt_composite2() {
992} 992}
993 993
994#[test] 994#[test]
995fn test_underscore() {
996 parse_macro(
997 r#"
998 macro_rules! foo {
999 ($_:tt) => { 0 }
1000 }
1001 "#,
1002 )
1003 .assert_expand_items(r#"foo! { => }"#, r#"0"#);
1004}
1005
1006#[test]
995fn test_lifetime() { 1007fn test_lifetime() {
996 parse_macro( 1008 parse_macro(
997 r#" 1009 r#"