Update test

This commit is contained in:
John Kåre Alsaker 2020-02-29 04:23:58 +01:00
parent 82920f36c4
commit d641ad044e
2 changed files with 13 additions and 2 deletions

View File

@ -13,7 +13,7 @@ macro_rules! pat_macro {
pat_macro!(A{a:a, b:0, c:_, ..});
};
($a:pat) => {
$a
$a //~ ERROR expected expression
};
}

View File

@ -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