aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-12-20 09:13:40 +0000
committerEdwin Cheng <[email protected]>2020-12-20 09:13:40 +0000
commitf942d10e8010918c677b40f821e504d87f057ead (patch)
treedf7be57bbd282b79ad964db4bf2704874a0b2035 /crates/mbe/src
parentf3125555a8de6fad4529408436800a6b1243a442 (diff)
Use pattern_single instead of pattern in mbe pat
Diffstat (limited to 'crates/mbe/src')
-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 f10e7a9b6..451fa1456 100644
--- a/crates/mbe/src/tests.rs
+++ b/crates/mbe/src/tests.rs
@@ -1004,6 +1004,18 @@ fn test_underscore() {
1004} 1004}
1005 1005
1006#[test] 1006#[test]
1007fn test_vertical_bar_with_pat() {
1008 parse_macro(
1009 r#"
1010 macro_rules! foo {
1011 (| $pat:pat | ) => { 0 }
1012 }
1013 "#,
1014 )
1015 .assert_expand_items(r#"foo! { | x | }"#, r#"0"#);
1016}
1017
1018#[test]
1007fn test_lifetime() { 1019fn test_lifetime() {
1008 parse_macro( 1020 parse_macro(
1009 r#" 1021 r#"