Skip to content

Commit 61a7548

Browse files
authored
Rollup merge of #76875 - denisvasilik:intra-doc-links-alloc-binary-heap, r=jyn514
Move to intra-doc links in library/alloc/src/collections/binary_heap.rs Helps with #75080. @rustbot modify labels: T-doc, A-intra-doc-links
2 parents bea0ae7 + 719c40c commit 61a7548

File tree

1 file changed

+14
-20
lines changed

1 file changed

+14
-20
lines changed

library/alloc/src/collections/binary_heap.rs

+14-20
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);
@@ -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")]
10661063
pub 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)]
11321128
pub 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)]
12371232
pub 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)]
12831277
pub struct DrainSorted<'a, T: Ord> {

0 commit comments

Comments
 (0)