]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/pat-lt-bracket-7.rs
Rollup merge of #67005 - andrewbanchich:master, r=joshtriplett
[rust.git] / src / test / ui / parser / pat-lt-bracket-7.rs
index 36c0d7733733ab2b6501b0aa74976ff8c0d9ddcb..327aef5ad15703cd16770ccdcd00dd8803c5e0ea 100644 (file)
@@ -1,3 +1,9 @@
 fn main() {
-    for thing(x[]) in foo {} //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
+    struct Thing(u8, [u8; 0]);
+    let foo = core::iter::empty();
+
+    for Thing(x[]) in foo {}
+    //~^ ERROR: expected one of `)`, `,`, `@`, or `|`, found `[`
 }
+
+const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types