| 1 | pub export fn entry() void { |
| 2 | const Foo = struct { u8, u8 }; |
| 3 | const foo: anyerror!Foo = error.Failure; |
| 4 | const bar, const baz = foo; |
| 5 | _ = bar; |
| 6 | _ = baz; |
| 7 | } |
| 8 | |
| 9 | // error |
| 10 | // |
| 11 | // :4:28: error: type 'anyerror!struct { u8, u8 }' cannot be destructured |
| 12 | // :4:26: note: result destructured here |
| 13 | // :4:28: note: consider using 'try', 'catch', or 'if' |