diff --git a/tests/ui/missing_colon.stderr b/tests/ui/missing_colon.stderr index 3cebc4fd3..1515211ad 100644 --- a/tests/ui/missing_colon.stderr +++ b/tests/ui/missing_colon.stderr @@ -4,4 +4,9 @@ error: unexpected end of macro invocation 4 | json!({ "a" }); | ^^^^^^^^^^^^^^ missing tokens in macro arguments | +note: while trying to match `@` + --> src/macros.rs + | + | (@array [$($elems:expr,)*]) => { + | ^ = note: this error originates in the macro `json_internal` which comes from the expansion of the macro `json` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/missing_comma.stderr b/tests/ui/missing_comma.stderr index bd911d035..bafa0f891 100644 --- a/tests/ui/missing_comma.stderr +++ b/tests/ui/missing_comma.stderr @@ -5,3 +5,9 @@ error: no rules expected the token `"2"` | -^^^ no rules expected this token in macro call | | | help: missing comma here + | +note: while trying to match `,` + --> src/macros.rs + | + | ($e:expr , $($tt:tt)*) => {}; + | ^ diff --git a/tests/ui/missing_value.stderr b/tests/ui/missing_value.stderr index a1edbc37b..9c9de99ca 100644 --- a/tests/ui/missing_value.stderr +++ b/tests/ui/missing_value.stderr @@ -4,4 +4,9 @@ error: unexpected end of macro invocation 4 | json!({ "a" : }); | ^^^^^^^^^^^^^^^^ missing tokens in macro arguments | +note: while trying to match `@` + --> src/macros.rs + | + | (@array [$($elems:expr,)*]) => { + | ^ = note: this error originates in the macro `json_internal` which comes from the expansion of the macro `json` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/tests/ui/parse_expr.stderr b/tests/ui/parse_expr.stderr index 6959673d9..cd3e1c94d 100644 --- a/tests/ui/parse_expr.stderr +++ b/tests/ui/parse_expr.stderr @@ -3,3 +3,9 @@ error: no rules expected the token `~` | 4 | json!({ "a" : ~ }); | ^ no rules expected this token in macro call + | +note: while trying to match meta-variable `$e:expr` + --> src/macros.rs + | + | ($e:expr , $($tt:tt)*) => {}; + | ^^^^^^^ diff --git a/tests/ui/unexpected_after_array_element.stderr b/tests/ui/unexpected_after_array_element.stderr index f745a212d..ef449f764 100644 --- a/tests/ui/unexpected_after_array_element.stderr +++ b/tests/ui/unexpected_after_array_element.stderr @@ -3,3 +3,5 @@ error: no rules expected the token `=>` | 4 | json!([ true => ]); | ^^ no rules expected this token in macro call + | + = note: while trying to match end of macro diff --git a/tests/ui/unexpected_after_map_entry.stderr b/tests/ui/unexpected_after_map_entry.stderr index a18c9b4cd..c62d90ba0 100644 --- a/tests/ui/unexpected_after_map_entry.stderr +++ b/tests/ui/unexpected_after_map_entry.stderr @@ -3,3 +3,5 @@ error: no rules expected the token `=>` | 4 | json!({ "k": true => }); | ^^ no rules expected this token in macro call + | + = note: while trying to match end of macro diff --git a/tests/ui/unexpected_colon.stderr b/tests/ui/unexpected_colon.stderr index ed038f608..7e47726bc 100644 --- a/tests/ui/unexpected_colon.stderr +++ b/tests/ui/unexpected_colon.stderr @@ -3,3 +3,5 @@ error: no rules expected the token `:` | 4 | json!({ : true }); | ^ no rules expected this token in macro call + | + = note: while trying to match end of macro diff --git a/tests/ui/unexpected_comma.stderr b/tests/ui/unexpected_comma.stderr index a4309c4e5..552f399a5 100644 --- a/tests/ui/unexpected_comma.stderr +++ b/tests/ui/unexpected_comma.stderr @@ -3,3 +3,5 @@ error: no rules expected the token `,` | 4 | json!({ "a" , "b": true }); | ^ no rules expected this token in macro call + | + = note: while trying to match end of macro