diff options
Diffstat (limited to 'crates/mbe/src/tests.rs')
-rw-r--r-- | crates/mbe/src/tests.rs | 12 |
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] |
995 | fn 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] | ||
995 | fn test_lifetime() { | 1007 | fn test_lifetime() { |
996 | parse_macro( | 1008 | parse_macro( |
997 | r#" | 1009 | r#" |