diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-14 20:57:52 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-14 20:57:52 +0100 |
commit | e5e6c363dc7ef081d6c9a5377563d3632c579ab2 (patch) | |
tree | 0855e13268d9b2d8cae15fe7ba1ffca05dee59b1 /crates/hir_ty/src/tests | |
parent | 260bcd942b9e6b13aa2d3257a08157bb8544b726 (diff) | |
parent | 2abb4c99fe8a5839fe2910e90f3471e6308f6229 (diff) |
Merge #8840
8840: fix: false positive "Missing match arm" when a tuple pattern is shorter than scrutinee type. r=Veykril a=iDawer
![Screenshot_20210515_003035](https://user-images.githubusercontent.com/7803845/118320023-2bcb7380-b4eb-11eb-9de6-d8762f981dc2.jpg)
Match checking diagnostic shouldn't fire when there is type mismatches.
rust-analyzer fd109fb58 2021-05-10 dev
(This is part of the preparation for https://github.com/rust-analyzer/rust-analyzer/pull/8717)
Co-authored-by: Dawer <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/tests')
-rw-r--r-- | crates/hir_ty/src/tests/patterns.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_ty/src/tests/patterns.rs b/crates/hir_ty/src/tests/patterns.rs index 33305f208..a0a7b4d0b 100644 --- a/crates/hir_ty/src/tests/patterns.rs +++ b/crates/hir_ty/src/tests/patterns.rs | |||
@@ -732,7 +732,7 @@ fn foo(tuple: (u8, i16, f32)) { | |||
732 | 111..112 'a': u8 | 732 | 111..112 'a': u8 |
733 | 114..115 'b': i16 | 733 | 114..115 'b': i16 |
734 | 124..126 '{}': () | 734 | 124..126 '{}': () |
735 | 136..142 '(a, b)': (u8, i16, f32) | 735 | 136..142 '(a, b)': (u8, i16) |
736 | 137..138 'a': u8 | 736 | 137..138 'a': u8 |
737 | 140..141 'b': i16 | 737 | 140..141 'b': i16 |
738 | 146..161 '{/*too short*/}': () | 738 | 146..161 '{/*too short*/}': () |