diff options
Diffstat (limited to 'tests/ui/parser/issues/issue-70388-recover-dotdotdot-rest-pat.rs')
-rw-r--r-- | tests/ui/parser/issues/issue-70388-recover-dotdotdot-rest-pat.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/ui/parser/issues/issue-70388-recover-dotdotdot-rest-pat.rs b/tests/ui/parser/issues/issue-70388-recover-dotdotdot-rest-pat.rs new file mode 100644 index 000000000..ca8abd78c --- /dev/null +++ b/tests/ui/parser/issues/issue-70388-recover-dotdotdot-rest-pat.rs @@ -0,0 +1,7 @@ +struct Foo(i32); + +fn main() { + let Foo(...) = Foo(0); //~ ERROR unexpected `...` + let [_, ..., _] = [0, 1]; //~ ERROR unexpected `...` + let _recovery_witness: () = 0; //~ ERROR mismatched types +} |