aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_mbe/src/lib.rs')
-rw-r--r--crates/ra_mbe/src/lib.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index 9d4744838..8e3167e55 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -731,4 +731,16 @@ MACRO_ITEMS@[0; 40)
731 } 731 }
732"#, r#"extern crate a ; mod b ; mod c {} use d ; const E : i32 = 0 ; static F : i32 = 0 ; impl G {} struct H ; enum I {Foo} trait J {} fn h () {} extern {} type T = u8 ;"#); 732"#, r#"extern crate a ; mod b ; mod c {} use d ; const E : i32 = 0 ; static F : i32 = 0 ; impl G {} struct H ; enum I {Foo} trait J {} fn h () {} extern {} type T = u8 ;"#);
733 } 733 }
734
735 #[test]
736 fn test_block() {
737 let rules = create_rules(
738 r#"
739 macro_rules! foo {
740 ($ i:block) => { fn foo() $ i }
741 }
742"#,
743 );
744 assert_expansion(&rules, "foo! { { 1; } }", "fn foo () {1 ;}");
745 }
734} 746}