From fbeccf0b9d179bdaa3ddaf80f4e517a35f747124 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lauren=C8=9Biu=20Nicola?= Date: Wed, 30 Dec 2020 11:37:52 +0200 Subject: Allow spurious warning from rust-lang/rust#80501 --- crates/hir_ty/src/infer/expr.rs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'crates/hir_ty/src') 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> { } Expr::Array(array) => { let elem_ty = match &expected.ty { + // FIXME: remove when https://github.com/rust-lang/rust/issues/80501 is fixed + #[allow(unreachable_patterns)] ty_app!(TypeCtor::Array, st) | ty_app!(TypeCtor::Slice, st) => { st.as_single().clone() } -- cgit v1.2.3