diff --git a/src/liballoc/vec.rs b/src/liballoc/vec.rs index d26cd77aae4b7..9e887cf446e70 100644 --- a/src/liballoc/vec.rs +++ b/src/liballoc/vec.rs @@ -2603,6 +2603,13 @@ impl IntoIter { } } +#[stable(feature = "vec_intoiter_as_ref", since = "1.46.0")] +impl AsRef<[T]> for IntoIter { + fn as_ref(&self) -> &[T] { + self.as_slice() + } +} + #[stable(feature = "rust1", since = "1.0.0")] unsafe impl Send for IntoIter {} #[stable(feature = "rust1", since = "1.0.0")]