]> git.lizzy.rs Git - rust.git/blobdiff - src/test/ui/parser/pat-lt-bracket-7.rs
Add 'compiler/rustc_codegen_cranelift/' from commit '793d26047f994e23415f8f6bb5686ff2...
[rust.git] / src / test / ui / parser / pat-lt-bracket-7.rs
index 1060d705e6e3126d72fb2f4c46974885c49dd5a3..327aef5ad15703cd16770ccdcd00dd8803c5e0ea 100644 (file)
@@ -1,5 +1,9 @@
 fn main() {
-    for thing(x[]) in foo {} //~ ERROR: expected one of `)`, `,`, or `@`, found `[`
-    //~^ ERROR cannot find value `foo` in this scope
-    //~| ERROR cannot find tuple struct/variant `thing` in this scope
+    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