1
Fork 0

remove reference to dangling from slice::Iter

This aligns the comment with reality and with IterMut. Also dangling does not seem to take any arguments.
This commit is contained in:
Marijn Schouten 2024-12-20 18:20:40 +01:00 committed by GitHub
parent 8a1f8039a7
commit 496adcf36c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,7 +68,7 @@ pub struct Iter<'a, T: 'a> {
ptr: NonNull<T>,
/// For non-ZSTs, the non-null pointer to the past-the-end element.
///
/// For ZSTs, this is `ptr::dangling(len)`.
/// For ZSTs, this is `ptr::without_provenance_mut(len)`.
end_or_len: *const T,
_marker: PhantomData<&'a T>,
}