aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_mbe/src/lib.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/crates/ra_mbe/src/lib.rs b/crates/ra_mbe/src/lib.rs
index 074be9043..814586fd6 100644
--- a/crates/ra_mbe/src/lib.rs
+++ b/crates/ra_mbe/src/lib.rs
@@ -209,6 +209,7 @@ impl_froms!(TokenTree: Leaf, Subtree);
209 209
210 pub(crate) fn assert_expansion(rules: &MacroRules, invocation: &str, expansion: &str) { 210 pub(crate) fn assert_expansion(rules: &MacroRules, invocation: &str, expansion: &str) {
211 let expanded = expand(rules, invocation); 211 let expanded = expand(rules, invocation);
212 assert_eq!(expanded.to_string(), expansion);
212 213
213 let tree = token_tree_to_macro_items(&expanded); 214 let tree = token_tree_to_macro_items(&expanded);
214 215
@@ -807,7 +808,7 @@ MACRO_ITEMS@[0; 40)
807 } 808 }
808"#, 809"#,
809 ); 810 );
810 assert_expansion(&rules, r#"foo!(u8 0)"#, r#"const VALUE: u8 = 0;"#); 811 assert_expansion(&rules, r#"foo!(u8 0)"#, r#"const VALUE : u8 = 0 ;"#);
811 } 812 }
812 813
813 #[test] 814 #[test]
@@ -819,6 +820,6 @@ MACRO_ITEMS@[0; 40)
819 } 820 }
820"#, 821"#,
821 ); 822 );
822 assert_expansion(&rules, r#"foo!(pub foo);"#, r#"pub fn foo() {}"#); 823 assert_expansion(&rules, r#"foo!(pub foo);"#, r#"pub fn foo () {}"#);
823 } 824 }
824} 825}