1
Fork 0

Rollup merge of #134570 - hkBst:patch-3, r=joboet

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:
Matthias Krüger 2024-12-20 21:32:32 +01:00 committed by GitHub
commit 04c804eb46
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>,
}