diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-04-25 11:53:40 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-04-25 11:53:40 +0100 |
commit | 7bc71732300a57fad928393220ecbe5f751cc20f (patch) | |
tree | c63d098391e44f1973c7ff2401be7db4c8261f6f /crates/ra_mbe/src | |
parent | f654f4943552888c2b8f079cf687970268d81f18 (diff) | |
parent | f0fece4be07e338bbccb212ed06a7345b8d04a40 (diff) |
Merge #4134
4134: Special case for empty comments in doc comment kind r=matklad a=edwin0cheng
Part of #4103
Fix `ui/empty/empty-comment.rs macros`
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_mbe/src')
-rw-r--r-- | crates/ra_mbe/src/tests.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_mbe/src/tests.rs b/crates/ra_mbe/src/tests.rs index bee59c5c4..7ceec7752 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] | ||
1854 | fn 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 | } | ||