mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Special case for empty comments
This commit is contained in:
parent
44e6c2cb54
commit
d20eea073e
2 changed files with 16 additions and 0 deletions
|
@ -1849,3 +1849,16 @@ fn test_expand_bad_literal() {
|
|||
)
|
||||
.assert_expand_err(r#"foo!(&k");"#, &ExpandError::BindingError("".into()));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_empty_comments() {
|
||||
parse_macro(
|
||||
r#"
|
||||
macro_rules! one_arg_macro { ($fmt:expr) => (); }
|
||||
"#,
|
||||
)
|
||||
.assert_expand_err(
|
||||
r#"one_arg_macro!(/**/)"#,
|
||||
&ExpandError::BindingError("expected Expr".into()),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue