diff options
| author | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2020-02-29 04:23:58 +0100 |
|---|---|---|
| committer | John Kåre Alsaker <john.kare.alsaker@gmail.com> | 2020-03-19 14:59:14 +0100 |
| commit | d641ad044eb535741cd2160e7cbf96d91c2c54c1 (patch) | |
| tree | c37adf83497e29e37b54a5ccad2aa0eb3ad6765d /src | |
| parent | 82920f36c47fb649858a31caf840e29088dcd8ab (diff) | |
| download | rust-d641ad044eb535741cd2160e7cbf96d91c2c54c1.tar.gz rust-d641ad044eb535741cd2160e7cbf96d91c2c54c1.zip | |
Update test
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/macros/trace_faulty_macros.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/macros/trace_faulty_macros.stderr | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/test/ui/macros/trace_faulty_macros.rs b/src/test/ui/macros/trace_faulty_macros.rs index 627d58abf4c..a55f05414b2 100644 --- a/src/test/ui/macros/trace_faulty_macros.rs +++ b/src/test/ui/macros/trace_faulty_macros.rs @@ -13,7 +13,7 @@ macro_rules! pat_macro { pat_macro!(A{a:a, b:0, c:_, ..}); }; ($a:pat) => { - $a + $a //~ ERROR expected expression }; } diff --git a/src/test/ui/macros/trace_faulty_macros.stderr b/src/test/ui/macros/trace_faulty_macros.stderr index a18e22e07f8..109b493b437 100644 --- a/src/test/ui/macros/trace_faulty_macros.stderr +++ b/src/test/ui/macros/trace_faulty_macros.stderr @@ -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 |
