about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMarijn Schouten <hkBst@users.noreply.github.com>2024-12-20 18:20:40 +0100
committerGitHub <noreply@github.com>2024-12-20 18:20:40 +0100
commit496adcf36cbbba53f7f6ca04110924967b33baac (patch)
treeec1a067e640d5b626708ae1ae8246f9f1ef7df98
parent8a1f8039a7ded79d3d4fe97b110016d89f2b11e2 (diff)
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.
-rw-r--r--library/core/src/slice/iter.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs
index c5746157d01..a27baf9db22 100644
--- a/library/core/src/slice/iter.rs
+++ b/library/core/src/slice/iter.rs
@@ -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>,
 }