rust/library/core
Stuart Cook 0d7f1e1b48
Rollup merge of #150658 - CieriA:patch-5, r=jhpratt
Clarify panic conditions in `Iterator::last`

Follow-up PR to rust-lang/rust#150580.

Now `Iterator::last`'s docs specify that it might panic only if the iterator is infinite, rather than if it has more than `usize::MAX` elements.

# Motivation
This is because `Iterator::last`, unlike `count`, also works on iterators with more than `usize::MAX` elements, but could panic on infinite iterators (as in `Repeat`), as discussed in rust-lang/rust#150580.

r? ``@jhpratt``
2026-01-04 21:37:04 +11:00
..
src Rollup merge of #150658 - CieriA:patch-5, r=jhpratt 2026-01-04 21:37:04 +11:00
Cargo.toml add autodiff examples 2025-11-16 23:35:37 -05:00