Don't create the array type twice
This commit is contained in:
parent
1ead4761e9
commit
9a8f117d7b
@ -1526,13 +1526,11 @@ fn check_expr_repeat(
|
||||
|
||||
self.check_repeat_element_needs_copy_bound(element, count, element_ty);
|
||||
|
||||
self.register_wf_obligation(
|
||||
Ty::new_array_with_const_len(tcx, t, count).into(),
|
||||
expr.span,
|
||||
traits::WellFormed(None),
|
||||
);
|
||||
let ty = Ty::new_array_with_const_len(tcx, t, count);
|
||||
|
||||
Ty::new_array_with_const_len(tcx, t, count)
|
||||
self.register_wf_obligation(ty.into(), expr.span, traits::WellFormed(None));
|
||||
|
||||
ty
|
||||
}
|
||||
|
||||
fn check_repeat_element_needs_copy_bound(
|
||||
|
Loading…
Reference in New Issue
Block a user