Fix mbe fail to pass expr with attr

This commit is contained in:
Edwin Cheng 2020-12-28 19:53:00 +08:00
parent 1d530756ed
commit 710407b11d
2 changed files with 13 additions and 1 deletions

View file

@ -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(