Skip to content

Commit

Permalink
Allow spurious warning from rust-lang/rust#80501
Browse files Browse the repository at this point in the history
  • Loading branch information
lnicola committed Dec 30, 2020
1 parent 386c447 commit fbeccf0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crates/hir_ty/src/infer/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down

0 comments on commit fbeccf0

Please sign in to comment.