Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoxc committed Mar 17, 2020
1 parent 3314a34 commit bdaf9e4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/test/ui/macros/trace_faulty_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ macro_rules! pat_macro {
pat_macro!(A{a:a, b:0, c:_, ..});
};
($a:pat) => {
$a
$a //~ ERROR expected expression
};
}

Expand Down
13 changes: 12 additions & 1 deletion src/test/ui/macros/trace_faulty_macros.stderr
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,16 @@ LL | my_recursive_macro!();
= note: expanding `my_recursive_macro! { }`
= note: to `my_recursive_macro ! () ;`

error: aborting due to 2 previous errors
error: expected expression, found `A { a: a, b: 0, c: _, .. }`
--> $DIR/trace_faulty_macros.rs:16:9
|
LL | $a
| ^^ expected expression
...
LL | let a = pat_macro!();
| ------------ in this macro invocation
|
= note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to 3 previous errors

0 comments on commit bdaf9e4

Please sign in to comment.