Skip to content

Commit e661a4c

Browse files
committed
Fix IterExt for arrays.
It's implemented for `std::array::IntoIter<T, N>` but that impl is never used. This commit changes it to an impl for `[T; N]` which does get used in various `alloc_from_iter([a, b])` call sites. (Note: I used logging to confirm that the old impl was never used and that the new one is used.)
1 parent 15efbaf commit e661a4c

File tree

1 file changed

+1
-1
lines changed
  • compiler/rustc_arena/src

1 file changed

+1
-1
lines changed

compiler/rustc_arena/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ where
133133
}
134134
}
135135

136-
impl<T, const N: usize> IterExt<T> for std::array::IntoIter<T, N> {
136+
impl<T, const N: usize> IterExt<T> for [T; N] {
137137
#[inline]
138138
fn alloc_from_iter(self, arena: &TypedArena<T>) -> &mut [T] {
139139
let len = self.len();

0 commit comments

Comments
 (0)