15
15
//! [dijkstra]: https://en.wikipedia.org/wiki/Dijkstra%27s_algorithm
16
16
//! [sssp]: https://en.wikipedia.org/wiki/Shortest_path_problem
17
17
//! [dir_graph]: https://en.wikipedia.org/wiki/Directed_graph
18
- //! [`BinaryHeap`]: struct.BinaryHeap.html
19
18
//!
20
19
//! ```
21
20
//! use std::cmp::Ordering;
@@ -240,10 +239,10 @@ use super::SpecExtend;
240
239
/// The value for `push` is an expected cost; the method documentation gives a
241
240
/// more detailed analysis.
242
241
///
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
247
246
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
248
247
pub struct BinaryHeap < T > {
249
248
data : Vec < T > ,
@@ -255,8 +254,7 @@ pub struct BinaryHeap<T> {
255
254
/// This `struct` is created by the [`peek_mut`] method on [`BinaryHeap`]. See
256
255
/// its documentation for more.
257
256
///
258
- /// [`peek_mut`]: struct.BinaryHeap.html#method.peek_mut
259
- /// [`BinaryHeap`]: struct.BinaryHeap.html
257
+ /// [`peek_mut`]: BinaryHeap::peek_mut
260
258
#[ stable( feature = "binary_heap_peek_mut" , since = "1.12.0" ) ]
261
259
pub struct PeekMut < ' a , T : ' a + Ord > {
262
260
heap : & ' a mut BinaryHeap < T > ,
@@ -802,7 +800,7 @@ impl<T> BinaryHeap<T> {
802
800
/// heap.push(4);
803
801
/// ```
804
802
///
805
- /// [`reserve`]: #method. reserve
803
+ /// [`reserve`]: BinaryHeap:: reserve
806
804
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
807
805
pub fn reserve_exact ( & mut self , additional : usize ) {
808
806
self . data . reserve_exact ( additional) ;
@@ -1057,11 +1055,10 @@ impl<T> Drop for Hole<'_, T> {
1057
1055
1058
1056
/// An iterator over the elements of a `BinaryHeap`.
1059
1057
///
1060
- /// This `struct` is created by the [`iter`] method on [` BinaryHeap`]. See its
1058
+ /// This `struct` is created by [` BinaryHeap::iter() `]. See its
1061
1059
/// documentation for more.
1062
1060
///
1063
- /// [`iter`]: struct.BinaryHeap.html#method.iter
1064
- /// [`BinaryHeap`]: struct.BinaryHeap.html
1061
+ /// [`iter`]: BinaryHeap::iter
1065
1062
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1066
1063
pub struct Iter < ' a , T : ' a > {
1067
1064
iter : slice:: Iter < ' a , T > ,
@@ -1122,11 +1119,10 @@ impl<T> FusedIterator for Iter<'_, T> {}
1122
1119
1123
1120
/// An owning iterator over the elements of a `BinaryHeap`.
1124
1121
///
1125
- /// This `struct` is created by the [`into_iter`] method on [` BinaryHeap`]
1122
+ /// This `struct` is created by [` BinaryHeap::into_iter() `]
1126
1123
/// (provided by the `IntoIterator` trait). See its documentation for more.
1127
1124
///
1128
- /// [`into_iter`]: struct.BinaryHeap.html#method.into_iter
1129
- /// [`BinaryHeap`]: struct.BinaryHeap.html
1125
+ /// [`into_iter`]: BinaryHeap::into_iter
1130
1126
#[ stable( feature = "rust1" , since = "1.0.0" ) ]
1131
1127
#[ derive( Clone ) ]
1132
1128
pub struct IntoIter < T > {
@@ -1227,11 +1223,10 @@ unsafe impl<T: Ord> TrustedLen for IntoIterSorted<T> {}
1227
1223
1228
1224
/// A draining iterator over the elements of a `BinaryHeap`.
1229
1225
///
1230
- /// This `struct` is created by the [`drain`] method on [` BinaryHeap`]. See its
1226
+ /// This `struct` is created by [` BinaryHeap::drain() `]. See its
1231
1227
/// documentation for more.
1232
1228
///
1233
- /// [`drain`]: struct.BinaryHeap.html#method.drain
1234
- /// [`BinaryHeap`]: struct.BinaryHeap.html
1229
+ /// [`drain`]: BinaryHeap::drain
1235
1230
#[ stable( feature = "drain" , since = "1.6.0" ) ]
1236
1231
#[ derive( Debug ) ]
1237
1232
pub struct Drain < ' a , T : ' a > {
@@ -1273,11 +1268,10 @@ impl<T> FusedIterator for Drain<'_, T> {}
1273
1268
1274
1269
/// A draining iterator over the elements of a `BinaryHeap`.
1275
1270
///
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
1277
1272
/// documentation for more.
1278
1273
///
1279
- /// [`drain_sorted`]: struct.BinaryHeap.html#method.drain_sorted
1280
- /// [`BinaryHeap`]: struct.BinaryHeap.html
1274
+ /// [`drain_sorted`]: BinaryHeap::drain_sorted
1281
1275
#[ unstable( feature = "binary_heap_drain_sorted" , issue = "59278" ) ]
1282
1276
#[ derive( Debug ) ]
1283
1277
pub struct DrainSorted < ' a , T : Ord > {
0 commit comments