diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index 188fd3f9d63..c9dd1efb374 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -194,7 +194,7 @@ use vec::{self, Vec}; /// /// // We can iterate over the items in the heap, although they are returned in /// // a random order. -/// for x in heap.iter() { +/// for x in &heap { /// println!("{}", x); /// } ///