7060: Fix mbe fail to pass expr with attr r=edwin0cheng a=edwin0cheng

bors r+

Fixes #5896

Co-authored-by: Edwin Cheng <edwin0cheng@gmail.com>
This commit is contained in:
bors[bot] 2020-12-28 12:34:19 +00:00 committed by GitHub
commit 77ad203a71
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 3 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(