Fix tuple_array_conversions lint on nightly
This commit is contained in:
parent
fc1152abf6
commit
e35eb91a33
@ -189,8 +189,8 @@ fn all_bindings_are_for_conv<'tcx>(
|
||||
tys.len() == elements.len() && tys.iter().chain(final_tys.iter().copied()).all_equal()
|
||||
},
|
||||
(ToType::Tuple, ty::Array(ty, len)) => {
|
||||
len.eval_target_usize(cx.tcx, cx.param_env) as usize == elements.len()
|
||||
&& final_tys.iter().chain(once(ty)).all_equal()
|
||||
let Some(len) = len.try_eval_target_usize(cx.tcx, cx.param_env) else { return false };
|
||||
len as usize == elements.len() && final_tys.iter().chain(once(ty)).all_equal()
|
||||
},
|
||||
_ => false,
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user