Allow spurious warning from rust-lang/rust#80501
This commit is contained in:
parent
386c447038
commit
fbeccf0b9d
1 changed files with 2 additions and 0 deletions
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue