rust/src/test/ui/parser/pat-lt-bracket-7.rs
Dan Robertson 1870537f27
initial implementation of or-pattern parsing
Initial implementation of parsing or-patterns e.g., `Some(Foo | Bar)`.
This is a partial implementation of RFC 2535.
2019-08-17 15:55:40 +00:00

9 lines
235 B
Rust

fn main() {
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