aboutsummaryrefslogtreecommitdiff
path: root/crates/mbe
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-12-28 12:34:19 +0000
committerGitHub <[email protected]>2020-12-28 12:34:19 +0000
commit77ad203a719be074e81485af7a4fb02fac6cbf61 (patch)
tree69f29dec5bfb8f9d3b86e0e05ccb9d88193fb02d /crates/mbe
parent99ec2f623d4446bcc0befe17a98db9c7062b8009 (diff)
parent877c251bef9bd4ac8ccab971786847bd4f28cc34 (diff)
Merge #7060
7060: Fix mbe fail to pass expr with attr r=edwin0cheng a=edwin0cheng bors r+ Fixes #5896 Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/mbe')
-rw-r--r--crates/mbe/src/tests.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/mbe/src/tests.rs b/crates/mbe/src/tests.rs
index 9958a33a0..1d9afb4fb 100644
--- a/crates/mbe/src/tests.rs
+++ b/crates/mbe/src/tests.rs
@@ -761,6 +761,18 @@ fn test_last_expr() {
761} 761}
762 762
763#[test] 763#[test]
764fn test_expr_with_attr() {
765 parse_macro(
766 r#"
767macro_rules! m {
768 ($a:expr) => {0}
769}
770"#,
771 )
772 .assert_expand_items("m!(#[allow(a)]())", "0");
773}
774
775#[test]
764fn test_ty() { 776fn test_ty() {
765 parse_macro( 777 parse_macro(
766 r#" 778 r#"