diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-12 15:49:43 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-12 15:49:43 +0100 |
commit | 312f1fe20a6a0a8e69834c66f51b9abc9db5e0ce (patch) | |
tree | 5b50f7359a6eaf482f01ade44dc12fd7bd1594ba /crates/hir_ty/src/tests/traits.rs | |
parent | 1c927d2f8efdf8488d319b335db70b120dc11c37 (diff) | |
parent | f28c053c677203f4dd101222460081dd97c1f440 (diff) |
Merge #8799
8799: Add basic support for array lengths in types r=flodiebold a=lf-
This recognizes `let a = [1u8, 2, 3]` as having type `[u8; 3]` instead
of the previous `[u8; _]`. Byte strings and `[0u8; 2]` kinds of range
array declarations are unsupported as before.
I don't know why a bunch of our rustc tests had single quotes inside
strings un-escaped by `UPDATE_EXPECT=1 cargo t`, but I don't think it's
bad? Maybe something in a nightly?
Co-authored-by: Jade <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/tests/traits.rs')
-rw-r--r-- | crates/hir_ty/src/tests/traits.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/tests/traits.rs b/crates/hir_ty/src/tests/traits.rs index ffc7c8ef4..47a1455fd 100644 --- a/crates/hir_ty/src/tests/traits.rs +++ b/crates/hir_ty/src/tests/traits.rs | |||
@@ -531,7 +531,7 @@ fn indexing_arrays() { | |||
531 | expect![[r#" | 531 | expect![[r#" |
532 | 10..26 '{ &mut...[2]; }': () | 532 | 10..26 '{ &mut...[2]; }': () |
533 | 12..23 '&mut [9][2]': &mut {unknown} | 533 | 12..23 '&mut [9][2]': &mut {unknown} |
534 | 17..20 '[9]': [i32; _] | 534 | 17..20 '[9]': [i32; 1] |
535 | 17..23 '[9][2]': {unknown} | 535 | 17..23 '[9][2]': {unknown} |
536 | 18..19 '9': i32 | 536 | 18..19 '9': i32 |
537 | 21..22 '2': i32 | 537 | 21..22 '2': i32 |