Skip to content

Commit

Permalink
Rollup merge of rust-lang#134570 - hkBst:patch-3, r=joboet
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
matthiaskrgr authored Dec 20, 2024
2 parents 9b4aa92 + 496adcf commit 04c804e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/slice/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
}
Expand Down

0 comments on commit 04c804e

Please sign in to comment.