diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-30 09:38:35 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-30 09:38:35 +0000 |
commit | 9d975320200e7d399661f04a0ba34b2fd0ba639b (patch) | |
tree | 96d310c201206add34f14a84506b74ba442aaa35 /crates/hir_ty/src/infer | |
parent | e7d2b5888b8a7e632ae9080108ccbc450316fd86 (diff) | |
parent | fbeccf0b9d179bdaa3ddaf80f4e517a35f747124 (diff) |
Merge #7090
7090: Allow spurious warning from rust-lang/rust#80501 r=lnicola a=lnicola
bors r+
Co-authored-by: Laurențiu Nicola <[email protected]>
Diffstat (limited to 'crates/hir_ty/src/infer')
-rw-r--r-- | crates/hir_ty/src/infer/expr.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/hir_ty/src/infer/expr.rs b/crates/hir_ty/src/infer/expr.rs index 70a3f3075..f2fc69b2f 100644 --- a/crates/hir_ty/src/infer/expr.rs +++ b/crates/hir_ty/src/infer/expr.rs | |||
@@ -648,6 +648,8 @@ impl<'a> InferenceContext<'a> { | |||
648 | } | 648 | } |
649 | Expr::Array(array) => { | 649 | Expr::Array(array) => { |
650 | let elem_ty = match &expected.ty { | 650 | let elem_ty = match &expected.ty { |
651 | // FIXME: remove when https://github.com/rust-lang/rust/issues/80501 is fixed | ||
652 | #[allow(unreachable_patterns)] | ||
651 | ty_app!(TypeCtor::Array, st) | ty_app!(TypeCtor::Slice, st) => { | 653 | ty_app!(TypeCtor::Array, st) | ty_app!(TypeCtor::Slice, st) => { |
652 | st.as_single().clone() | 654 | st.as_single().clone() |
653 | } | 655 | } |