}
Tuple(..) => {
// Proceed recursively, check all fields.
- ty.tuple_fields().find_map(|field| ty_find_init_error(tcx, field, init))
+ ty.tuple_fields().iter().find_map(|field| ty_find_init_error(tcx, field, init))
}
// Conservative fallback.
_ => None,
// We are extremely conservative with what we warn about.
let conjured_ty = cx.typeck_results().expr_ty(expr);
if let Some((msg, span)) =
- with_no_trimmed_paths(|| ty_find_init_error(cx.tcx, conjured_ty, init))
+ with_no_trimmed_paths!(ty_find_init_error(cx.tcx, conjured_ty, init))
{
cx.struct_span_lint(INVALID_VALUE, expr.span, |lint| {
let mut err = lint.build(&format!(
}
(Array(a_ty, a_const), Array(b_ty, b_const)) => {
// For arrays, we also check the constness of the type.
- a_const.val == b_const.val
+ a_const.val() == b_const.val()
&& structurally_same_type_impl(seen_types, cx, *a_ty, *b_ty, ckind)
}
(Slice(a_ty), Slice(b_ty)) => {
)
}
(Tuple(a_substs), Tuple(b_substs)) => {
- a_substs.types().eq_by(b_substs.types(), |a_ty, b_ty| {
+ a_substs.iter().eq_by(b_substs.iter(), |a_ty, b_ty| {
structurally_same_type_impl(seen_types, cx, a_ty, b_ty, ckind)
})
}