aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe/src
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-04-25 10:37:34 +0100
committerEdwin Cheng <[email protected]>2020-04-25 10:37:34 +0100
commitd20eea073eff348cbc38c03c45305cf21e428f69 (patch)
tree249e116dffe89c2104748f1befe110469d05a128 /crates/ra_mbe/src
parent44e6c2cb54312e14b3c7bd9d64a9fa0547c17ad7 (diff)
Special case for empty comments
Diffstat (limited to 'crates/ra_mbe/src')
-rw-r--r--crates/ra_mbe/src/tests.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs
index 100ed41f2..364dcc3c3 100644
--- a/crates/ra_mbe/src/tests.rs
+++ b/crates/ra_mbe/src/tests.rs
@@ -1849,3 +1849,16 @@ fn test_expand_bad_literal() {
1849 ) 1849 )
1850 .assert_expand_err(r#"foo!(&k");"#, &ExpandError::BindingError("".into())); 1850 .assert_expand_err(r#"foo!(&k");"#, &ExpandError::BindingError("".into()));
1851} 1851}
1852
1853#[test]
1854fn test_empty_comments() {
1855 parse_macro(
1856 r#"
1857 macro_rules! one_arg_macro { ($fmt:expr) => (); }
1858 "#,
1859 )
1860 .assert_expand_err(
1861 r#"one_arg_macro!(/**/)"#,
1862 &ExpandError::BindingError("expected Expr".into()),
1863 );
1864}