From 710407b11dce7274ccf16b072fb500b9e5d4fb15 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Mon, 28 Dec 2020 19:53:00 +0800 Subject: Fix mbe fail to pass expr with attr --- crates/mbe/src/tests.rs | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crates/mbe') diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs index 6cd0ed205..0147506c7 100644 --- a/crates/mbe/src/tests.rs +++ b/crates/mbe/src/tests.rs @@ -760,6 +760,18 @@ fn test_last_expr() { ); } +#[test] +fn test_expr_with_attr() { + parse_macro( + r#" +macro_rules! m { + ($a:expr) => {0} +} +"#, + ) + .assert_expand_items("m!(#[allow(a)]())", "0"); +} + #[test] fn test_ty() { parse_macro( -- cgit v1.2.3