gccrs
gccrs copied to clipboard
unrecognised token ‘|’ in grouped or tuple pattern after first pattern
Other example which should work as soon as we fix the above example:
enum NewTypeOrStruct {
One(i32),
Two{other: String, value: i32},
}
fn foo((NewTypeOrStruct::One(foo) | NewTypeOrStruct::Two{other: _, value: foo}): NewTypeOrStruct) -> i32 {
foo + 15i32
}
fn main() {
foo(NewTypeOrStruct::One(15));
foo(NewTypeOrStruct::Two {
other: String::from("other"),
value: 14
});
}
Originally posted by @CohenArthur in https://github.com/Rust-GCC/gccrs/issues/995#issuecomment-1061139942