mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Merge #7090
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:
commit
9d97532020
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