Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/simple.rs')
| -rw-r--r-- | crates/hir-ty/src/tests/simple.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/simple.rs b/crates/hir-ty/src/tests/simple.rs index 478411f5a8..2e107b2c59 100644 --- a/crates/hir-ty/src/tests/simple.rs +++ b/crates/hir-ty/src/tests/simple.rs @@ -3943,3 +3943,16 @@ fn foo() { "#]], ); } + +#[test] +fn infer_array_size() { + check_no_mismatches( + r#" +fn foo(a: [u8; 3]) {} + +fn bar() { + foo([0; _]); +} + "#, + ); +} |