rust/tests/ui/parser/pat-lt-bracket-7.rs
Nadrieril 962c0140c7 parse guard patterns
Co-authored-by: Max Niederman <max@maxniederman.com>
2024-11-24 19:42:33 +01:00

10 lines
241 B
Rust

fn main() {
struct Thing(u8, [u8; 0]);
let foo = core::iter::empty();
for Thing(x[]) in foo {}
//~^ ERROR: expected one of `)`, `,`, `@`, `if`, or `|`, found `[`
}
const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types