1515//! [dijkstra]: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
1616//! [sssp]: https://en.wikipedia.org/wiki/Shortest_path_problem
1717//! [dir_graph]: https://en.wikipedia.org/wiki/Directed_graph
18- //! [`BinaryHeap`]: struct.BinaryHeap.html
1918//!
2019//! ```
2120//! use std::cmp::Ordering;
@@ -240,10 +239,10 @@ use super::SpecExtend;
240239/// The value for `push` is an expected cost; the method documentation gives a
241240/// more detailed analysis.
242241///
243- /// [push]: #method. push
244- /// [pop]: #method. pop
245- /// [peek]: #method. peek
246- /// [peek\_mut]: #method. peek_mut
242+ /// [push]: BinaryHeap:: push
243+ /// [pop]: BinaryHeap:: pop
244+ /// [peek]: BinaryHeap:: peek
245+ /// [peek\_mut]: BinaryHeap:: peek_mut
247246#[ stable( feature = "rust1" , since = "1.0.0" ) ]
248247pub struct BinaryHeap < T > {
249248 data : Vec < T > ,
@@ -255,8 +254,7 @@ pub struct BinaryHeap<T> {
255254/// This `struct` is created by the [`peek_mut`] method on [`BinaryHeap`]. See
256255/// its documentation for more.
257256///
258- /// [`peek_mut`]: struct.BinaryHeap.html#method.peek_mut
259- /// [`BinaryHeap`]: struct.BinaryHeap.html
257+ /// [`peek_mut`]: BinaryHeap::peek_mut
260258#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
261259pub struct PeekMut < ' a , T : ' a + Ord > {
262260 heap : & ' a mut BinaryHeap < T > ,
@@ -802,7 +800,7 @@ impl<T> BinaryHeap<T> {
802800 /// heap.push(4);
803801 /// ```
804802 ///
805- /// [`reserve`]: #method. reserve
803+ /// [`reserve`]: BinaryHeap:: reserve
806804 #[ stable( feature = "rust1" , since = "1.0.0" ) ]
807805 pub fn reserve_exact ( & mut self , additional : usize ) {
808806 self . data . reserve_exact ( additional) ;
@@ -1057,11 +1055,10 @@ impl<T> Drop for Hole<'_, T> {
10571055
10581056/// An iterator over the elements of a `BinaryHeap`.
10591057///
1060- /// This `struct` is created by the [`iter`] method on [` BinaryHeap`]. See its
1058+ /// This `struct` is created by [` BinaryHeap::iter() `]. See its
10611059/// documentation for more.
10621060///
1063- /// [`iter`]: struct.BinaryHeap.html#method.iter
1064- /// [`BinaryHeap`]: struct.BinaryHeap.html
1061+ /// [`iter`]: BinaryHeap::iter
10651062#[ stable( feature = "rust1" , since = "1.0.0" ) ]
10661063pub struct Iter < ' a , T : ' a > {
10671064 iter : slice:: Iter < ' a , T > ,
@@ -1122,11 +1119,10 @@ impl<T> FusedIterator for Iter<'_, T> {}
11221119
11231120/// An owning iterator over the elements of a `BinaryHeap`.
11241121///
1125- /// This `struct` is created by the [`into_iter`] method on [` BinaryHeap`]
1122+ /// This `struct` is created by [` BinaryHeap::into_iter() `]
11261123/// (provided by the `IntoIterator` trait). See its documentation for more.
11271124///
1128- /// [`into_iter`]: struct.BinaryHeap.html#method.into_iter
1129- /// [`BinaryHeap`]: struct.BinaryHeap.html
1125+ /// [`into_iter`]: BinaryHeap::into_iter
11301126#[ stable( feature = "rust1" , since = "1.0.0" ) ]
11311127#[ derive( Clone ) ]
11321128pub struct IntoIter < T > {
@@ -1227,11 +1223,10 @@ unsafe impl<T: Ord> TrustedLen for IntoIterSorted<T> {}
12271223
12281224/// A draining iterator over the elements of a `BinaryHeap`.
12291225///
1230- /// This `struct` is created by the [`drain`] method on [` BinaryHeap`]. See its
1226+ /// This `struct` is created by [` BinaryHeap::drain() `]. See its
12311227/// documentation for more.
12321228///
1233- /// [`drain`]: struct.BinaryHeap.html#method.drain
1234- /// [`BinaryHeap`]: struct.BinaryHeap.html
1229+ /// [`drain`]: BinaryHeap::drain
12351230#[ stable( feature = "drain" , since = "1.6.0" ) ]
12361231#[ derive( Debug ) ]
12371232pub struct Drain < ' a , T : ' a > {
@@ -1273,11 +1268,10 @@ impl<T> FusedIterator for Drain<'_, T> {}
12731268
12741269/// A draining iterator over the elements of a `BinaryHeap`.
12751270///
1276- /// This `struct` is created by the [`drain_sorted`] method on [` BinaryHeap`]. See its
1271+ /// This `struct` is created by [` BinaryHeap::drain_sorted() `]. See its
12771272/// documentation for more.
12781273///
1279- /// [`drain_sorted`]: struct.BinaryHeap.html#method.drain_sorted
1280- /// [`BinaryHeap`]: struct.BinaryHeap.html
1274+ /// [`drain_sorted`]: BinaryHeap::drain_sorted
12811275#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
12821276#[ derive( Debug ) ]
12831277pub struct DrainSorted < ' a , T : Ord > {
0 commit comments