aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe/src/tests
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2021-04-03 02:14:56 +0100
committerGitHub <[email protected]>2021-04-03 02:14:56 +0100
commitbf695c487a05efecf64475ff4c34a16e90629ff1 (patch)
treeb02702c17749c958434ee465530555b335abe2b8 /crates/mbe/src/tests
parenteb264fb81963d9ec08b2797818073e8ae2993a41 (diff)
parent5742cdf3f1c591709e68d65c5701257cb77583db (diff)
Merge #8304
8304: Support the new `panic!()` macro r=jonas-schievink a=jonas-schievink Includes a minor fixup to macro 2.0 parsing. bors r+ Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/mbe/src/tests')
-rw-r--r--crates/mbe/src/tests/expand.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/mbe/src/tests/expand.rs b/crates/mbe/src/tests/expand.rs
index 8951f3813..e02d038b6 100644
--- a/crates/mbe/src/tests/expand.rs
+++ b/crates/mbe/src/tests/expand.rs
@@ -663,6 +663,21 @@ macro foo {
663} 663}
664 664
665#[test] 665#[test]
666fn test_macro_2_0_panic_2015() {
667 parse_macro2(
668 r#"
669macro panic_2015 {
670 () => (
671 ),
672 (bar) => (
673 ),
674}
675"#,
676 )
677 .assert_expand_items("panic_2015!(bar);", "");
678}
679
680#[test]
666fn test_path() { 681fn test_path() {
667 parse_macro( 682 parse_macro(
668 r#" 683 r#"