@@ -31,9 +31,9 @@ impl<T, const N: usize> PartialDrop for [MaybeUninit<T>; N] {
31
31
/// The real `array::IntoIter<T, N>` stores a `PolymorphicIter<[MaybeUninit<T>, N]>`
32
32
/// which it unsizes to `PolymorphicIter<[MaybeUninit<T>]>` to iterate.
33
33
#[ allow( private_bounds) ]
34
- pub ( super ) struct PolymorphicIter < TAIL : ?Sized >
34
+ pub ( super ) struct PolymorphicIter < DATA : ?Sized >
35
35
where
36
- TAIL : PartialDrop ,
36
+ DATA : PartialDrop ,
37
37
{
38
38
/// The elements in `data` that have not been yielded yet.
39
39
///
@@ -55,13 +55,13 @@ where
55
55
/// - `data[alive]` is alive (i.e. contains valid elements)
56
56
/// - `data[..alive.start]` and `data[alive.end..]` are dead (i.e. the
57
57
/// elements were already read and must not be touched anymore!)
58
- data : TAIL ,
58
+ data : DATA ,
59
59
}
60
60
61
61
#[ allow( private_bounds) ]
62
- impl < TAIL : ?Sized > PolymorphicIter < TAIL >
62
+ impl < DATA : ?Sized > PolymorphicIter < DATA >
63
63
where
64
- TAIL : PartialDrop ,
64
+ DATA : PartialDrop ,
65
65
{
66
66
#[ inline]
67
67
pub ( super ) const fn len ( & self ) -> usize {
70
70
}
71
71
72
72
#[ allow( private_bounds) ]
73
- impl < TAIL : ?Sized > Drop for PolymorphicIter < TAIL >
73
+ impl < DATA : ?Sized > Drop for PolymorphicIter < DATA >
74
74
where
75
- TAIL : PartialDrop ,
75
+ DATA : PartialDrop ,
76
76
{
77
77
#[ inline]
78
78
fn drop ( & mut self ) {
@@ -209,7 +209,7 @@ impl<T> PolymorphicIter<[MaybeUninit<T>]> {
209
209
R : Try < Output = B > ,
210
210
{
211
211
// `alive` is an `IndexRange`, not an arbitrary iterator, so we can
212
- // trust that its `try_rfold ` isn't going to do something weird like
212
+ // trust that its `try_fold ` isn't going to do something weird like
213
213
// call the fold-er multiple times for the same index.
214
214
let data = & mut self . data ;
215
215
self . alive . try_fold ( init, move |accum, idx| {
0 commit comments