]> git.lizzy.rs Git - rust.git/commitdiff
Update test
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Sat, 29 Feb 2020 03:23:58 +0000 (04:23 +0100)
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>
Thu, 19 Mar 2020 13:59:14 +0000 (14:59 +0100)
src/test/ui/macros/trace_faulty_macros.rs
src/test/ui/macros/trace_faulty_macros.stderr

index 627d58abf4ca2aa55926c17bfb96d84cd908c92c..a55f05414b206c98f1a002859bdb0e444b152e2f 100644 (file)
@@ -13,7 +13,7 @@ macro_rules! pat_macro {
         pat_macro!(A{a:a, b:0, c:_, ..});
     };
     ($a:pat) => {
-        $a
+        $a //~ ERROR expected expression
     };
 }
 
index a18e22e07f8bcb5774c6797d1c231bb19c8739ab..109b493b43717e970268c315bf4e1afc07da8535 100644 (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