Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/mismatched_array_pat_len.rs')
| -rw-r--r-- | crates/ide-diagnostics/src/handlers/mismatched_array_pat_len.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mismatched_array_pat_len.rs b/crates/ide-diagnostics/src/handlers/mismatched_array_pat_len.rs index 8cae405c92..bd02ce6a02 100644 --- a/crates/ide-diagnostics/src/handlers/mismatched_array_pat_len.rs +++ b/crates/ide-diagnostics/src/handlers/mismatched_array_pat_len.rs @@ -111,4 +111,15 @@ fn f(arr: [i32; 3]) { "#, ); } + + #[test] + fn destructuring_assignment_array_rest() { + check_diagnostics( + r#" +fn main() { + [..] = [1, 2, 3]; +} + "#, + ); + } } |