Trigger missing comma rustc suggestion

This commit is contained in:
David Tolnay 2020-06-28 22:46:33 -07:00
parent 0443daa488
commit 9357569b1c
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 4 additions and 2 deletions

View File

@ -299,5 +299,5 @@ macro_rules! json_unexpected {
#[macro_export]
#[doc(hidden)]
macro_rules! json_expect_expr_comma {
($e:expr ,) => {};
($e:expr , $($tt:tt)*) => {};
}

View File

@ -2,4 +2,6 @@ error: no rules expected the token `"2"`
--> $DIR/missing_comma.rs:4:21
|
4 | json!({ "1": "" "2": "" });
| ^^^ no rules expected this token in macro call
| -^^^ no rules expected this token in macro call
| |
| help: missing comma here