Skip to content

Commit 49b8f87

Browse files
committed
Document that TrustedRandomAccess also requires that the number of items fits into an usize
1 parent 44c5554 commit 49b8f87

File tree

1 file changed

+2
-1
lines changed
  • library/core/src/iter/adapters

1 file changed

+2
-1
lines changed

library/core/src/iter/adapters/zip.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,8 @@ impl<A: Debug + TrustedRandomAccess, B: Debug + TrustedRandomAccess> ZipFmt<A, B
384384
///
385385
/// # Safety
386386
///
387-
/// The iterator's `size_hint` must be exact and cheap to call.
387+
/// The iterator's `size_hint` must be exact and cheap to call, which also
388+
/// means that the number of items must fit into an `usize`.
388389
///
389390
/// `size` may not be overridden.
390391
///

0 commit comments

Comments
 (0)