Skip to content
Permalink
Browse files

docs: Iterator adapters have unspecified results after a panic

  • Loading branch information
Mark-Simulacrum committed Dec 23, 2019
1 parent a916ac2 commit 65e366064f222502c96d0d39102ea6cea9d4bafa
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/libcore/iter/mod.rs
@@ -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

0 comments on commit 65e3660

Please sign in to comment.
You can’t perform that action at this time.