Remove derive(Copy) on ArrayWindows

The derived `T: Copy` constraint is not appropriate for an iterator by
reference, but we generally do not want `Copy` on iterators anyway.

(cherry picked from commit 2bae85ec52)
This commit is contained in:
Josh Stone 2026-01-24 11:06:07 -08:00
parent dbfbf2df54
commit f5ccb92483

View file

@ -2175,7 +2175,7 @@ unsafe impl<T> Sync for ChunksExactMut<'_, T> where T: Sync {}
///
/// [`array_windows`]: slice::array_windows
/// [slices]: slice
#[derive(Debug, Clone, Copy)]
#[derive(Debug, Clone)]
#[stable(feature = "array_windows", since = "1.94.0")]
#[must_use = "iterators are lazy and do nothing unless consumed"]
pub struct ArrayWindows<'a, T: 'a, const N: usize> {