Skip to content

Commit bdb039d

Browse files
committed
Use intra-doc links
1 parent 7bdb5de commit bdb039d

File tree

1 file changed

+10
-16
lines changed

1 file changed

+10
-16
lines changed

library/alloc/src/collections/binary_heap.rs

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
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")]
248247
pub 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")]
261259
pub 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);
@@ -1060,8 +1058,7 @@ impl<T> Drop for Hole<'_, T> {
10601058
/// This `struct` is created by the [`iter`] method on [`BinaryHeap`]. 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")]
10661063
pub struct Iter<'a, T: 'a> {
10671064
iter: slice::Iter<'a, T>,
@@ -1125,8 +1122,7 @@ impl<T> FusedIterator for Iter<'_, T> {}
11251122
/// This `struct` is created by the [`into_iter`] method on [`BinaryHeap`]
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)]
11321128
pub struct IntoIter<T> {
@@ -1230,8 +1226,7 @@ unsafe impl<T: Ord> TrustedLen for IntoIterSorted<T> {}
12301226
/// This `struct` is created by the [`drain`] method on [`BinaryHeap`]. 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)]
12371232
pub struct Drain<'a, T: 'a> {
@@ -1276,8 +1271,7 @@ impl<T> FusedIterator for Drain<'_, T> {}
12761271
/// This `struct` is created by the [`drain_sorted`] method on [`BinaryHeap`]. 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)]
12831277
pub struct DrainSorted<'a, T: Ord> {

0 commit comments

Comments
 (0)