Skip to content

Commit a8a829d

Browse files
committed
Add intra-doc-links to BinaryHeap rustdoc
1 parent 52ab3e8 commit a8a829d

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

library/alloc/src/collections/binary_heap.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ use super::SpecExtend;
159159
/// This will be a max-heap.
160160
///
161161
/// It is a logic error for an item to be modified in such a way that the
162-
/// item's ordering relative to any other item, as determined by the `Ord`
162+
/// item's ordering relative to any other item, as determined by the [`Ord`]
163163
/// trait, changes while it is in the heap. This is normally only possible
164-
/// through `Cell`, `RefCell`, global state, I/O, or unsafe code. The
164+
/// through [`Cell`], [`RefCell`], global state, I/O, or unsafe code. The
165165
/// behavior resulting from such a logic error is not specified, but will
166166
/// not result in undefined behavior. This could include panics, incorrect
167167
/// results, aborts, memory leaks, and non-termination.
@@ -219,7 +219,7 @@ use super::SpecExtend;
219219
///
220220
/// ## Min-heap
221221
///
222-
/// Either `std::cmp::Reverse` or a custom `Ord` implementation can be used to
222+
/// Either [`core::cmp::Reverse`] or a custom [`Ord`] implementation can be used to
223223
/// make `BinaryHeap` a min-heap. This makes `heap.pop()` return the smallest
224224
/// value instead of the greatest one.
225225
///
@@ -250,6 +250,10 @@ use super::SpecExtend;
250250
/// The value for `push` is an expected cost; the method documentation gives a
251251
/// more detailed analysis.
252252
///
253+
/// [`core::cmp::Reverse`]: core::cmp::Reverse
254+
/// [`Ord`]: core::cmp::Ord
255+
/// [`Cell`]: core::cell::Cell
256+
/// [`RefCell`]: core::cell::RefCell
253257
/// [push]: BinaryHeap::push
254258
/// [pop]: BinaryHeap::pop
255259
/// [peek]: BinaryHeap::peek

0 commit comments

Comments
 (0)