aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/tests
diff options
context:
space:
mode:
authorKevin Mehall <[email protected]>2021-03-20 18:18:57 +0000
committerKevin Mehall <[email protected]>2021-03-20 18:28:44 +0000
commit0a0e22235b7ad222be1aaa7765b580f4096c9aeb (patch)
tree1742dd3512904541543f1b7a929cbc77cad14402 /crates/mbe/src/tests
parent5cc8ad0c4afda0c8b6222156b0c725cfb61892c0 (diff)
Make bare underscore token an Ident rather than Punct in proc-macro
Diffstat (limited to 'crates/mbe/src/tests')
-rw-r--r--crates/mbe/src/tests/expand.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/mbe/src/tests/expand.rs b/crates/mbe/src/tests/expand.rs
index 9dd8ff75b..2cce62781 100644
--- a/crates/mbe/src/tests/expand.rs
+++ b/crates/mbe/src/tests/expand.rs
@@ -1080,6 +1080,12 @@ macro_rules! q {
1080} 1080}
1081 1081
1082#[test] 1082#[test]
1083fn test_underscore_lifetime() {
1084 parse_macro(r#"macro_rules! q { ($a:lifetime) => {0}; }"#)
1085 .assert_expand_items(r#"q!['_]"#, r#"0"#);
1086}
1087
1088#[test]
1083fn test_vertical_bar_with_pat() { 1089fn test_vertical_bar_with_pat() {
1084 parse_macro( 1090 parse_macro(
1085 r#" 1091 r#"