From 8b147624ff906a11134d2e18be071c6cb8ec4beb Mon Sep 17 00:00:00 2001 From: Jade Date: Wed, 12 May 2021 04:39:48 -0700 Subject: Add lowering of array lengths in types Now e.g. ```rust fn a(b: [u8; 2]) { } ``` will know about the length of b. --- crates/hir_ty/src/tests/patterns.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'crates/hir_ty/src/tests/patterns.rs') diff --git a/crates/hir_ty/src/tests/patterns.rs b/crates/hir_ty/src/tests/patterns.rs index 33305f208..b36e77e91 100644 --- a/crates/hir_ty/src/tests/patterns.rs +++ b/crates/hir_ty/src/tests/patterns.rs @@ -345,19 +345,19 @@ fn infer_pattern_match_arr() { "#, expect![[r#" 10..179 '{ ... } }': () - 20..23 'arr': [f64; _] + 20..23 'arr': [f64; 2] 36..46 '[0.0, 1.0]': [f64; 2] 37..40 '0.0': f64 42..45 '1.0': f64 52..177 'match ... }': () - 58..61 'arr': [f64; _] - 72..80 '[1.0, a]': [f64; _] + 58..61 'arr': [f64; 2] + 72..80 '[1.0, a]': [f64; 2] 73..76 '1.0': f64 73..76 '1.0': f64 78..79 'a': f64 84..110 '{ ... }': () 98..99 'a': f64 - 120..126 '[b, c]': [f64; _] + 120..126 '[b, c]': [f64; 2] 121..122 'b': f64 124..125 'c': f64 130..171 '{ ... }': () -- cgit v1.2.3