7090: Allow spurious warning from rust-lang/rust#80501 r=lnicola a=lnicola

bors r+

Co-authored-by: Laurențiu Nicola <lnicola@dend.ro>
This commit is contained in:
bors[bot] 2020-12-30 09:38:35 +00:00 committed by GitHub
commit 9d97532020
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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()
}