File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ fn _assert_is_object_safe(_: &Iterator<Item=()>) {}
24
24
/// This is the main iterator trait. For more about the concept of iterators
25
25
/// generally, please see the [module-level documentation]. In particular, you
26
26
/// may want to know how to [implement `Iterator`][impl].
27
- ///
27
+ ///
28
28
/// Note: Methods on infinite iterators that generally require traversing every
29
29
/// element to produce a result may not terminate, even on traits for which a
30
30
/// result is determinable in finite time.
Original file line number Diff line number Diff line change 297
297
//! ```
298
298
//!
299
299
//! This will print the numbers `0` through `4`, each on their own line.
300
- //!
300
+ //!
301
301
//! Bear in mind that methods on infinite iterators, even those for which a
302
302
//! result can be computed in finite time, may not terminate. Specifically,
303
303
//! methods such as [`min`], which in the general case require traversing
304
304
//! every element in the iterator, are likely never to terminate for any
305
305
//! infinite iterators.
306
- //!
307
- //! ```
306
+ //!
307
+ //! ```no_run
308
308
//! let positives = 1..;
309
309
//! let least = positives.min().unwrap(); // Oh no! An infinite loop!
310
310
//! // `positives.min` causes an infinite loop, so we won't reach this point!
You can’t perform that action at this time.
0 commit comments