Skip to content

Commit

Permalink
docs: Iterator adapters have unspecified results after a panic
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Simulacrum committed Dec 23, 2019
1 parent a916ac2 commit 65e3660
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/libcore/iter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,11 @@
//! Common iterator adapters include [`map`], [`take`], and [`filter`].
//! For more, see their documentation.
//!
//! If an iterator adapter panics, the iterator will be in an unspecified (but
//! memory safe) state. This state is also not guaranteed to stay the same
//! across versions of Rust, so you should avoid relying on the exact values
//! returned by an iterator which panicked.
//!
//! [`map`]: trait.Iterator.html#method.map
//! [`take`]: trait.Iterator.html#method.take
//! [`filter`]: trait.Iterator.html#method.filter
Expand Down

0 comments on commit 65e3660

Please sign in to comment.